Add dynamic operations change UI
This commit is contained in:
@ -42,16 +42,23 @@ namespace Hcs.WebApp.BackgroundServices
|
||||
{
|
||||
var executor = executorFactory.CreateExecutor(scope, client, operation);
|
||||
await headquartersService.SetOperationStartedAsync(operation.Id);
|
||||
|
||||
state.InvokeOnOperationStarted(operation);
|
||||
|
||||
messageGuid = await executor.ExecuteAsync(stoppingToken);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
await headquartersService.SetOperationEndedWithFailAsync(operation.Id, e.CombineMessages());
|
||||
|
||||
state.InvokeOnOperationEnded(operation);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(messageGuid))
|
||||
{
|
||||
await headquartersService.SetOperationMessageGuidAsync(operation.Id, messageGuid);
|
||||
|
||||
state.InvokeOnOperationExecuted(operation);
|
||||
}
|
||||
|
||||
state.UnsetProcessingOperation(operation);
|
||||
|
||||
Reference in New Issue
Block a user