feat(templateDistributor): заготовка

This commit is contained in:
Mikhail Trubnikov
2026-01-21 16:28:17 +10:00
parent b83438d6ca
commit e5bc42741c
11 changed files with 65 additions and 470 deletions

View File

@@ -42,7 +42,7 @@ namespace PARR.TemplateDistributor
public async Task StopAsync()
{
await mqService.DisposeAsync();
await mqService.DisposeAsync();
}
private async Task UpdateScheduleAsync(string msg)
@@ -53,9 +53,9 @@ namespace PARR.TemplateDistributor
if (query == null)
return;
if (!await validatorService.IsValidApplicationAndWorksAsync(query.ApplicationInWorkId))
if (!await validatorService.IsValidJobGroupAsync(query.JobGroupId))
{
logger.LogError($"Некорректные параметры регламентной работы {nameof(query.ApplicationInWorkId)}: {query.ApplicationInWorkId}");
logger.LogError("Не корректные параметры группы работ {jobGroupId}. Не буду ничего делать.", query.JobGroupId);
return;
}
@@ -63,9 +63,9 @@ namespace PARR.TemplateDistributor
{
var service = scope.ServiceProvider.GetService<ITemplateDistributor>();
if (service == null)
throw new Exception($"Не найден сервис: {nameof(service.GetType)}");
throw new Exception($"Не найден сервис: {nameof(ITemplateDistributor)}");
await service.UpdateScheduleAsync(query.ApplicationInWorkId);
await service.DistributeAsync(query.JobGroupId);
}
}