mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 00:57:59 +00:00
Hardened background work against disconnected circuits (#937)
This commit is contained in:
1 parent
99089f853e
commit
f03c2d1c88
44 files changed
+500
-126
No files matched your search
+2
-2
@@ -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>
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+2
-2
@@ -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))
|
||||
|
||||
+1
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user