Fix campaign steps

This commit is contained in:
2025-11-01 20:13:20 +09:00
parent 3c3510a8f9
commit e7f646c408
4 changed files with 41 additions and 8 deletions

View File

@ -42,6 +42,8 @@ namespace Hcs.WebApp.BackgroundServices
{
while (state.TryDequeueOperation(out var operation))
{
state.SetProcessingOperation(operation);
if (stoppingToken.IsCancellationRequested) return;
entries.Add(new (operation, new WaitState()));
@ -86,6 +88,11 @@ namespace Hcs.WebApp.BackgroundServices
entry.state.attempt++;
entry.state.timer = 0;
}
if (entry.state.done)
{
state.UnsetProcessingOperation(entry.operation);
}
}
entries.RemoveAll(x => x.state.done);