feat(espptemplatesync): Изменение статуса шаблона для робота на Wait при необходимости его обновления в АСУ ЕСПП
This commit is contained in:
@@ -109,7 +109,7 @@ namespace PARR.EsppTemplateSync.Services
|
||||
|
||||
if (isChanged)
|
||||
{
|
||||
SetUpdateStatus(template);
|
||||
SetUpdateStatus(templateService, template);
|
||||
|
||||
if (!await templateService.CommitAsync())
|
||||
{
|
||||
@@ -117,16 +117,17 @@ namespace PARR.EsppTemplateSync.Services
|
||||
}
|
||||
else
|
||||
logger.LogInformation($"----- Установлен принудительный статус обновления Template {template.Name} -----");
|
||||
}
|
||||
} //надо ли проверять если не изменился, но был статус Updating не понятно. Доверяем роботу пока, что после окончания работ от точно сообщит
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
private void SetUpdateStatus(Template template)
|
||||
private void SetUpdateStatus(ITemplateService templateService, Template template)
|
||||
{
|
||||
template.StatusCode = (int)StatusTemplateEnum.Updating;
|
||||
templateService.ChangeRobotStatus(RobotStatusEnum.Wait, ref template);
|
||||
}
|
||||
|
||||
private bool IsChanged(EsppTemplate template, EsppTemplate esppTemplate)
|
||||
|
||||
Reference in New Issue
Block a user