feat(esppSyn): обновлены отладочные комментарии

This commit is contained in:
Mikhail Kuznetsov
2026-01-26 17:16:56 +10:00
parent 5c5d30900e
commit b1946ab9c8
3 changed files with 31 additions and 32 deletions

View File

@@ -55,7 +55,7 @@ namespace PARR.EsppScheduleSync
if (!isConnected)
throw new Exception("Ошибка при подключении к RabbitMq");
logger.LogInformation($"Запущена проверка очереди {globalSettings.MqSettings!.QueueName}.");
logger.LogInformation("Запущена проверка очереди {QueueName}.", globalSettings.MqSettings!.QueueName);
}
@@ -63,7 +63,7 @@ namespace PARR.EsppScheduleSync
{
await mqService.DisposeAsync();
logger.LogInformation($"=== === === Соединение с очередью {globalSettings.MqSettings!.QueueName} закрыто === === ===");
logger.LogInformation("=== === === Соединение с очередью {QueueName} закрыто === === ===", globalSettings.MqSettings!.QueueName);
}
@@ -202,7 +202,7 @@ namespace PARR.EsppScheduleSync
ScheduleName = template.Name,
IsActive = template.IsActiveSchedule,
//ResponseArea = template.Host!.ResponseArea!.Name,//TODO Migration to job
//WorkGroup = template.Host!.WorkGroup!,
//WorkGroup = template.Host!.WorkGroup!,//TODO Migration to job
//WorkGroup = template.Host!.WorkGroup!.Name,//TODO Migration to job
//Мы решили, что для всех расписаний "Нет исключений", если что-то поменяется, тут нужно переделать
//TypeV60calendar = settingsFromDb.ScheduleExcludeType == "Нет исключений" ? "NONE" : "",
@@ -234,14 +234,14 @@ namespace PARR.EsppScheduleSync
// мы знаем, что у нас точно в шаблоне есть инклуды до ScheduleExcludeType и ScheduleExcludeTypeCalendar
if (template.Job?.Group?.ScheduleExcludeTypeCalendar == null)
{
logger.LogDebug("Для шаблона шаблона {templte}, {templateId} нет исключений календаря", template.Name, template.Id);
logger.LogDebug("Для шаблона шаблона {TemplateName}, {TemplateId} нет исключений календаря", template.Name, template.Id);
//TODO:!!!!!!!!!!! Вот тут null или string.Empty??? Спросить у Андрея что он нам вернет!
return string.Empty;
}
logger.LogDebug("Для шаблона шаблона {templte}, {templateId} установлено исключений календаря \"{name}\", EsppValue: {esppValue}", template.Name, template.Id, template.Job.Group.ScheduleExcludeTypeCalendar.Title, template.Job.Group.ScheduleExcludeTypeCalendar.EsppValue);
logger.LogDebug("Для шаблона шаблона {TemplateName}, {TemplateId} установлено исключений календаря \"{Name}\", EsppValue: {EsppValue}", template.Name, template.Id, template.Job.Group.ScheduleExcludeTypeCalendar.Title, template.Job.Group.ScheduleExcludeTypeCalendar.EsppValue);
return template.Job.Group.ScheduleExcludeTypeCalendar.EsppValue;
}
@@ -258,11 +258,11 @@ namespace PARR.EsppScheduleSync
// на всякий конечно же проверим
if (template.Job?.Group?.ScheduleExcludeType == null)
{
logger.LogError("Для шаблона {templte}, {templateId} не смог получить тип исключения, установил значение по умолчанию \"Без исключения\"", template.Name, template.Id);
logger.LogError("Для шаблона {TemplateName}, {TemplateId} не смог получить тип исключения, установил значение по умолчанию \"Без исключения\"", template.Name, template.Id);
return "NONE";
}
logger.LogDebug("Для шаблона шаблона {templte}, {templateId} тип исключения \"{name}\", EsppValue: {esppValue}", template.Name, template.Id, template.Job.Group.ScheduleExcludeType.Title, template.Job.Group.ScheduleExcludeType.EsppValue);
logger.LogDebug("Для шаблона шаблона {TemplateName}, {TemplateId} тип исключения \"{Name}\", EsppValue: {EsppValue}", template.Name, template.Id, template.Job.Group.ScheduleExcludeType.Title, template.Job.Group.ScheduleExcludeType.EsppValue);
return template.Job.Group.ScheduleExcludeType.EsppValue;
@@ -297,7 +297,7 @@ namespace PARR.EsppScheduleSync
var esppSchedule = esppSchTypeConfigService.GetEsppScheduleDto(template.Job!.GroupId);
if (esppSchedule == null)
{
logger.LogError($"Не смог получить расписание из БД для шаблона templateId: {template.Id}, {template.Name}");
logger.LogError("Не смог получить расписание из БД для шаблона templateId: {TemplateId}, {TemplateName}", template.Id, template.Name);
return;
}
@@ -361,7 +361,7 @@ namespace PARR.EsppScheduleSync
var splittedContent = str.Split(globalSettings.ParsingSeparator);
if (splittedContent.Length != 24)
{
logger.LogError($"Входная строка после сплита не содержит 24 объекта (факт: {splittedContent.Length}).");
logger.LogError("Входная строка после сплита не содержит 24 объекта (факт: {Length}).", splittedContent.Length);
return null;
}
@@ -437,7 +437,7 @@ namespace PARR.EsppScheduleSync
if (typeSchedule == EsppSchTypeScheduleEnum.Annually2.ToString().ToLower())
return EsppSchTypeScheduleEnum.Annually2;
logger.LogError($"Не смог преобразовать Тип повторения из ЕСПП в EsppSchTypeScheduleEnum. Получено значение {typeSchedule}");
logger.LogError("Не смог преобразовать Тип повторения из ЕСПП в EsppSchTypeScheduleEnum. Получено значение {TypeSchedule}", typeSchedule);
return null;
}
@@ -458,7 +458,7 @@ namespace PARR.EsppScheduleSync
if (!string.IsNullOrEmpty(settingsFromDb.TemplatePrefixWithoutVariable) && name.Contains(settingsFromDb.TemplatePrefixWithoutVariable)) // , StringComparison.CurrentCultureIgnoreCase
return true;
logger.LogWarning($"Имя шаблона или расписания не соответствует обязательному префиксу({settingsFromDb.TemplatePrefixWithoutVariable}). {name} игнорирован");
logger.LogWarning("Имя шаблона или расписания не соответствует обязательному префиксу({Prefix}). {Name} игнорирован", settingsFromDb.TemplatePrefixWithoutVariable, name);
return false;
}
@@ -562,4 +562,4 @@ namespace PARR.EsppScheduleSync
}
}
}
}