feat(api): AgentTaskController добавлено журналирование ответа при запросе заданий для агента
This commit is contained in:
@@ -87,7 +87,7 @@ namespace PARR.API.Controllers.V1
|
|||||||
foreach (var template in templates)
|
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!.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())
|
if (!templateSchedule.Any())
|
||||||
{
|
{
|
||||||
@@ -117,6 +117,8 @@ namespace PARR.API.Controllers.V1
|
|||||||
|
|
||||||
response.Scheduled = response.Scheduled.OrderBy(t => t.StartAt).ToList();
|
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);
|
return Ok(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user