|
@@ -22,18 +22,22 @@ namespace Hotline.Application.Jobs
|
|
{
|
|
{
|
|
var task = await _apptaskDomainService.GetWaitingTaskAsync(context.CancellationToken);
|
|
var task = await _apptaskDomainService.GetWaitingTaskAsync(context.CancellationToken);
|
|
if (task is null) return;
|
|
if (task is null) return;
|
|
|
|
+ IApptaskExecutor executor;
|
|
switch (task.TaskType)
|
|
switch (task.TaskType)
|
|
{
|
|
{
|
|
case ETaskType.Delay:
|
|
case ETaskType.Delay:
|
|
- var executor = _serviceProvider.GetService<IApptaskExecutor<BatchDelayNextFlowDto>>();
|
|
|
|
- await _apptaskDomainService.ExecuteAsync(executor, task, context.CancellationToken);
|
|
|
|
|
|
+ executor = _serviceProvider.GetService<IApptaskExecutor<BatchDelayNextFlowDto>>();
|
|
break;
|
|
break;
|
|
case ETaskType.Screen:
|
|
case ETaskType.Screen:
|
|
break;
|
|
break;
|
|
|
|
+ case ETaskType.VoiceVisit:
|
|
|
|
+ executor = _serviceProvider.GetService<IApptaskExecutor<BatchVoiceVisitDto>>();
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
throw new ArgumentOutOfRangeException();
|
|
throw new ArgumentOutOfRangeException();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ await _apptaskDomainService.ExecuteAsync(executor, task, context.CancellationToken);
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
|
|
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary>
|
|
@@ -42,6 +46,6 @@ namespace Hotline.Application.Jobs
|
|
GC.SuppressFinalize(this);
|
|
GC.SuppressFinalize(this);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|