Skip to content

Commit b4681fb

Browse files
Merge branch 'dev' into LEGLINK-951-DRMP-500-error
2 parents 4d5828d + 68b2842 commit b4681fb

2 files changed

Lines changed: 18 additions & 35 deletions

File tree

DotNet/Automation.UI/Services/Persistence/PatientBundleExternalizationMigrationService.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ private async Task<int> MigrateEmbeddedPayloadsAsync(CancellationToken ct)
7878
var scenarios = await _scenarios
7979
.Find(scenarioFilter)
8080
.SortBy(s => s.Id)
81-
.Project(s => new ScenarioEmbeddedPayloadProjection
82-
{
83-
Id = s.Id,
84-
ImportedPatientBundlesJson = s.ImportedPatientBundlesJson
85-
})
8681
.Limit(MigrationBatchSize)
8782
.ToListAsync(ct);
8883

@@ -121,12 +116,6 @@ await _scenarios.UpdateOneAsync(
121116
var runInputs = await _runInputs
122117
.Find(runInputFilter)
123118
.SortBy(r => r.RunId)
124-
.Project(r => new RunInputEmbeddedPayloadProjection
125-
{
126-
RunId = r.RunId,
127-
RunConfigurationJson = r.RunConfigurationJson,
128-
ImportedBundleIds = r.ImportedBundleIds
129-
})
130119
.Limit(MigrationBatchSize)
131120
.ToListAsync(ct);
132121

@@ -158,19 +147,6 @@ await _runInputs.UpdateOneAsync(
158147
return migrated;
159148
}
160149

161-
private sealed class ScenarioEmbeddedPayloadProjection
162-
{
163-
public Guid Id { get; init; }
164-
public string? ImportedPatientBundlesJson { get; init; }
165-
}
166-
167-
private sealed class RunInputEmbeddedPayloadProjection
168-
{
169-
public Guid RunId { get; init; }
170-
public string? RunConfigurationJson { get; init; }
171-
public List<Guid> ImportedBundleIds { get; init; } = [];
172-
}
173-
174150
private async Task<(bool Changed, string? Json, List<ImportedBundleReference> References, int MigratedCount)> ExternalizeBundleJsonAsync(
175151
string? json,
176152
Guid? scenarioId,

DotNet/Shared/Application/Services/AzureAppConfigurationRefreshService.cs

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
1+
using Microsoft.Extensions.Configuration.AzureAppConfiguration;
22
using Microsoft.Extensions.Hosting;
33
using Microsoft.Extensions.Logging;
44

@@ -21,21 +21,28 @@ public AzureAppConfigurationRefreshService(
2121

2222
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
2323
{
24-
while (!stoppingToken.IsCancellationRequested)
24+
try
2525
{
26-
foreach (var refresher in _refreshers)
26+
while (!stoppingToken.IsCancellationRequested)
2727
{
28-
try
28+
foreach (var refresher in _refreshers)
2929
{
30-
await refresher.TryRefreshAsync(stoppingToken);
30+
try
31+
{
32+
await refresher.TryRefreshAsync(stoppingToken);
33+
}
34+
catch (Exception ex)
35+
{
36+
_logger.LogDebug(ex, "Failed to refresh Azure App Configuration.");
37+
}
3138
}
32-
catch (Exception ex)
33-
{
34-
_logger.LogDebug(ex, "Failed to refresh Azure App Configuration.");
35-
}
36-
}
3739

38-
await Task.Delay(RefreshInterval, stoppingToken);
40+
await Task.Delay(RefreshInterval, stoppingToken);
41+
}
42+
}
43+
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested)
44+
{
45+
_logger.LogDebug("Azure App Configuration refresh service is stopping.");
3946
}
4047
}
4148
}

0 commit comments

Comments
 (0)