Add dynamic operations change UI

This commit is contained in:
2025-11-05 16:59:39 +09:00
parent 05e24d4eae
commit 6e191f3676
5 changed files with 124 additions and 6 deletions

View File

@ -10,6 +10,8 @@ namespace Hcs.WebApp.BackgroundServices
public bool Ready { get; set; }
public event Action<Operation> OnOperationEnded;
public void EnqueueOperation(Operation operation)
{
operationsInQueue.Enqueue(operation);
@ -34,5 +36,14 @@ namespace Hcs.WebApp.BackgroundServices
{
return operationsInQueue.Any(x => x.CampaignId == campaignId) || operationsInProcess.Any(x => x.CampaignId == campaignId);
}
public void InvokeOnOperationEnded(Operation operation)
{
try
{
OnOperationEnded?.Invoke(operation);
}
catch { }
}
}
}