From 3c03ee343c93cdeb8ec9ccb34116d2dffea22921 Mon Sep 17 00:00:00 2001 From: Mikhail Kuznetsov Date: Fri, 1 Mar 2024 11:03:11 +1000 Subject: [PATCH] =?UTF-8?q?feat(api):=20AgentTaskController=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=B6=D1=83=D1=80?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=B0=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B5=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D0=B9=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B0=D0=B3=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PARR.API/Controllers/V1/AgentTaskController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PARR.API/Controllers/V1/AgentTaskController.cs b/PARR.API/Controllers/V1/AgentTaskController.cs index 886c1c13..361fe992 100644 --- a/PARR.API/Controllers/V1/AgentTaskController.cs +++ b/PARR.API/Controllers/V1/AgentTaskController.cs @@ -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); }