feat(all): ! Критические изменения логики работы всех сервисорв, База Данных имееет неокончательную версию. Template, Scheduler переведены на работу с Unit+Job+JobGroup вместо Host+ApplicationsInWork
This commit is contained in:
@@ -26,7 +26,7 @@ namespace PARR.API.MappingProfiles.Resolvers
|
||||
|
||||
public List<RobotTaskScheduleSchResponse>? Resolve(RobotConfiguration source, RobotTaskScheduleResponse destination, List<RobotTaskScheduleSchResponse>? destMember, ResolutionContext context)
|
||||
{
|
||||
var appInWorksId = source.Template!.ApplicationInWorkId;
|
||||
var appInWorksId = source.Template!.JobId;
|
||||
|
||||
var schedule = esppConfigService.GetEsppScheduleDto(appInWorksId);
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace PARR.API.MappingProfiles.Resolvers
|
||||
}).OrderBy(t => t.Order).ToList();
|
||||
|
||||
//Если задача относится к распределенной модели исполнения за период месяц устанавливаем день равный NextRun
|
||||
if (source.Template!.ApplicationsInWork!.IsAutoDistributionEnabled && schedule.TypeSchedule.Id == (int)EsppSchTypeScheduleEnum.Monthly)
|
||||
if (source.Template!.Job!.Group!.IsAutoDistributionEnabled && schedule.TypeSchedule.Id == (int)EsppSchTypeScheduleEnum.Monthly)
|
||||
{
|
||||
var nextRunForRobot = nextRunModifierService.GetNextRunByAccountRobotTimeZone(source.Template.NextRun);
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ namespace PARR.API.MappingProfiles.Resolvers
|
||||
|
||||
public EsppScheduleResponse? Resolve(Template source, TemplateResponse destination, EsppScheduleResponse? destMember, ResolutionContext context)
|
||||
{
|
||||
var schedule = esppConfigService.GetEsppScheduleDto(source.ApplicationInWorkId);
|
||||
var schedule = esppConfigService.GetEsppScheduleDto(source.Job!.GroupId);
|
||||
|
||||
if (schedule == null)
|
||||
{
|
||||
logger.LogError($"TemplateScheduleResolver: Не смог замапить расписание для робота, так как оно null. appInWorksId: {source.ApplicationInWorkId}");
|
||||
logger.LogError($"TemplateScheduleResolver: Не смог замапить расписание для робота, так как оно null. appInWorksId: {source.Job!.GroupId}");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user