Add operation kind

This commit is contained in:
2025-11-16 17:41:58 +09:00
parent 6abff9cc7e
commit a4055bee7e
10 changed files with 129 additions and 8 deletions

View File

@ -8,6 +8,7 @@ namespace Hcs.WebApp.BackgroundServices
CampaignManagementState campaignManagementState,
OperationExecutionState operationExecutionState,
ResultGetState resultGetState,
DataParsingState dataParsingState,
ManagerFactory managerFactory,
IServiceScopeFactory scopeFactory) : BackgroundService
{
@ -18,6 +19,7 @@ namespace Hcs.WebApp.BackgroundServices
private readonly CampaignManagementState campaignManagementState = campaignManagementState;
private readonly OperationExecutionState operationExecutionState = operationExecutionState;
private readonly ResultGetState resultGetState = resultGetState;
private readonly DataParsingState dataParsingState = dataParsingState;
private readonly ManagerFactory managerFactory = managerFactory;
private readonly IServiceScopeFactory scopeFactory = scopeFactory;
private readonly List<IManager> managers = [];
@ -75,7 +77,7 @@ namespace Hcs.WebApp.BackgroundServices
private async Task WaitForOtherStates()
{
while (!operationExecutionState.Ready || !resultGetState.Ready)
while (!operationExecutionState.Ready || !resultGetState.Ready || !dataParsingState.Ready)
{
await Task.Delay(STATES_WAIT_TIME);
}