feat(api): AgentTaskController добавлено журналирование ответа при запросе заданий для агента

This commit is contained in:
Mikhail Kuznetsov
2024-03-01 11:03:11 +10:00
parent caa84638df
commit 3c03ee343c

View File

@@ -87,7 +87,7 @@ namespace PARR.API.Controllers.V1
foreach (var template in templates)
{
//var templateSchedule = await esppScheduleTransformService.GetNextScheduleAsync(template.ApplicationInWorkId, template.ApplicationsInWork!.LastRun ?? template.ApplicationsInWork!.NextRun);
var templateSchedule = await esppScheduleTransformService.GetNextScheduleAsync(template.ApplicationInWorkId, template.ApplicationsInWork!.NextRun);
var templateSchedule = await esppScheduleTransformService.GetNextScheduleAsync(template.ApplicationInWorkId, template.ApplicationsInWork!.NextRun);
if (!templateSchedule.Any())
{
@@ -117,6 +117,8 @@ namespace PARR.API.Controllers.V1
response.Scheduled = response.Scheduled.OrderBy(t => t.StartAt).ToList();
logger.LogInformation($"Агент с IP-адресом {ip} получил задания: [{string.Join(';', response.Scheduled.Select(s => $"StartAt:{s.StartAt}, Name:{s.Name}, TemplateId:{s.TemplateId}"))}]");
return Ok(response);
}