Hardened background work against disconnected circuits (#937)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-08-25 18:53:09 +02:00
1 parent 99089f853e
commit f03c2d1c88
44 files changed
+500 -126

No files matched your search

@@ -246,14 +246,14 @@ public partial class VisualBriefingAssistant
if (this.selectedBriefing?.BriefingId != briefingId)
return;
_ = this.InvokeAsync(() =>
this.InvokeAsync(() =>
{
if (this.selectedBriefing?.BriefingId != briefingId)
return;
this.latestBuild = this.BuildProgressService.GetLatest(briefingId);
this.StateHasChanged();
});
}).Observe($"{nameof(VisualBriefingAssistant)}: rendering the build progress");
}
/// <summary>
@@ -265,7 +265,7 @@ public partial class VisualBriefingAssistant
: briefing.Versions.OrderByDescending(version => version.VersionNumber).FirstOrDefault()?.RevisionId ?? Guid.Empty;
if (revisionId != Guid.Empty)
_ = this.SelectRevisionAsync(revisionId);
this.SelectRevisionAsync(revisionId).Observe($"{nameof(VisualBriefingAssistant)}: selecting a revision");
else
{
this.selectedRevisionId = Guid.Empty;
@@ -136,7 +136,7 @@ public partial class VisualBriefingAssistant
!Guid.TryParse(owner.Id, out var briefingId))
return;
_ = this.InvokeAsync(async () =>
this.InvokeAsync(async () =>
{
await this.ConsumeMediaOutcomeAsync(owner);
if (!this.MediaTranscriptionService.IsBusy(owner))
@@ -152,7 +152,7 @@ public partial class VisualBriefingAssistant
}
this.StateHasChanged();
});
}).Observe($"{nameof(VisualBriefingAssistant)}: consuming a media import outcome");
}
/// <summary>
@@ -157,7 +157,7 @@ public partial class VisualBriefingAssistant : MSGComponentBase
this.BuildProgressService.Changed += this.BuildProgressChanged;
await this.ReloadListAsync();
await this.ConsumePendingMediaOutcomesAsync();
_ = this.MonitorSourceStatusAsync(this.sourceMonitorCancellation.Token);
this.MonitorSourceStatusAsync(this.sourceMonitorCancellation.Token).Observe($"{nameof(VisualBriefingAssistant)}: monitoring the source status");
var deferredInstruction = this.MessageBus.TakeDeferredMessages<string>(Event.SEND_TO_VISUAL_BRIEFING_ASSISTANT).LastOrDefault();
if (!string.IsNullOrWhiteSpace(deferredInstruction))
@@ -56,7 +56,7 @@ public partial class VisualBriefingBuildProgress : MSGComponentBase
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
_ = this.MonitorBuildDurationAsync(this.durationMonitorCancellation.Token);
this.MonitorBuildDurationAsync(this.durationMonitorCancellation.Token).Observe($"{nameof(VisualBriefingBuildProgress)}: monitoring the build duration");
}
protected override void OnParametersSet()