Fulfill export executor
This commit is contained in:
@ -1,13 +1,18 @@
|
||||
using Hcs.Broker;
|
||||
using Hcs.Service.Async.NsiCommon;
|
||||
using Hcs.WebApp.Data.Hcs;
|
||||
using Hcs.WebApp.Services;
|
||||
|
||||
namespace Hcs.WebApp.BackgroundServices.OperationExecutors.NsiCommon
|
||||
{
|
||||
public class ExportNsiItemExecutor_15_7_0_1(IClient client, Operation operation) : ExecutorBase(client, operation)
|
||||
public class ExportNsiItemExecutor_15_7_0_1(IClient client, IServiceScopeFactory scopeFactory, Operation operation) : ExecutorBase(client, scopeFactory, operation)
|
||||
{
|
||||
public override async Task<string> ExecuteAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
return await client.NsiCommon.RequestExportNsiItemAsync(1, Service.Async.NsiCommon.ListGroup.NSI, cancellationToken);
|
||||
using var scope = scopeFactory.CreateScope();
|
||||
var registryService = scope.ServiceProvider.GetRequiredService<RegistryService>();
|
||||
var registry = await registryService.GetRegistryByOperationId(operation.Id);
|
||||
return await client.NsiCommon.RequestExportNsiItemAsync(registry.Number, ListGroup.NSI, cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user