feat(api, allLogs): в TemplateResponse добавлен TemplateStatusType. Шаблоны можно фильтровать по statusType. При изменении маски имени шаблона в Job, отправляется задание в очередь на переименование связанных шаблонов. Во всех проектах перенастроены логи, в проде, не пишутся логи внутрь контейнера, только в stdout.
This commit is contained in:
@@ -6,6 +6,15 @@
|
|||||||
"Microsoft": "Debug",
|
"Microsoft": "Debug",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WorkerSettings": {
|
"WorkerSettings": {
|
||||||
"RepeatEvery": "12:00:00",
|
"RepeatEvery": "12:00:00",
|
||||||
|
|||||||
@@ -6,7 +6,16 @@
|
|||||||
//"Microsoft": "Information",
|
//"Microsoft": "Information",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
|
|||||||
@@ -15,16 +15,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.EntityFrameworkCore.Database.Command": "Warning"
|
"Microsoft.EntityFrameworkCore.Database.Command": "Warning"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WorkerSettings": {
|
"WorkerSettings": {
|
||||||
"RepeatEvery": "00:10:00"
|
"RepeatEvery": "00:10:00"
|
||||||
|
|||||||
@@ -75,6 +75,11 @@
|
|||||||
public const string getParam = "{id}";
|
public const string getParam = "{id}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class TemplateStatusType
|
||||||
|
{
|
||||||
|
public const string GetAll = Base + "/template-status-types/";
|
||||||
|
}
|
||||||
|
|
||||||
public static class TemplateHistory
|
public static class TemplateHistory
|
||||||
{
|
{
|
||||||
public const string GetAll = Base + "/template-histories/";
|
public const string GetAll = Base + "/template-histories/";
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
using PARR.Constants;
|
||||||
|
|
||||||
|
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||||
{
|
{
|
||||||
public class TemplateQuery
|
public class TemplateQuery
|
||||||
{
|
{
|
||||||
@@ -17,5 +19,10 @@
|
|||||||
/// Поиск по ИД Задания (JobId)
|
/// Поиск по ИД Задания (JobId)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? JobId { get; set; }
|
public Guid? JobId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// StatusType
|
||||||
|
/// </summary>
|
||||||
|
public TemplateStatusTypeEnum? StatusTypeId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,5 +51,7 @@
|
|||||||
public EsppScheduleResponse? Schedule { get; set; }
|
public EsppScheduleResponse? Schedule { get; set; }
|
||||||
|
|
||||||
public int OrderCount { get; set; }
|
public int OrderCount { get; set; }
|
||||||
|
|
||||||
|
public TemplateStatusTypeResponse? StatusType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
namespace PARR.API.Contracts.V1.Responses
|
||||||
|
{
|
||||||
|
public class TemplateStatusTypeResponse
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public required string Name { get; set; }
|
||||||
|
|
||||||
|
public required string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,6 +39,9 @@ namespace PARR.API.Controllers.V1
|
|||||||
this.clientService = clientService;
|
this.clientService = clientService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// !!!!!!!!!! Это старый контроллер, удалить !!!!!!!!!!
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Запрос на генерацию шаблонов
|
/// Запрос на генерацию шаблонов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ using PARR.API.Contracts.V1.Responses.Base;
|
|||||||
using PARR.API.Controllers.V1.Base;
|
using PARR.API.Controllers.V1.Base;
|
||||||
using PARR.API.Extensions;
|
using PARR.API.Extensions;
|
||||||
using PARR.API.Services.Interfaces;
|
using PARR.API.Services.Interfaces;
|
||||||
|
using PARR.API.Settings;
|
||||||
|
using PARR.BLL.Domain.Mq;
|
||||||
|
using PARR.BLL.Services.Interfaces;
|
||||||
|
using PARR.Common.Domain;
|
||||||
using PARR.Constants;
|
using PARR.Constants;
|
||||||
using PARR.DAL.Contracts;
|
using PARR.DAL.Contracts;
|
||||||
using PARR.DAL.DomainModels;
|
using PARR.DAL.DomainModels;
|
||||||
@@ -19,6 +23,7 @@ using PARR.DAL.Models.Job;
|
|||||||
using PARR.DAL.Services.Interfaces;
|
using PARR.DAL.Services.Interfaces;
|
||||||
using PARR.DAL.Services.Interfaces.Job;
|
using PARR.DAL.Services.Interfaces.Job;
|
||||||
using PARR.DAL.Services.Interfaces.Unit;
|
using PARR.DAL.Services.Interfaces.Unit;
|
||||||
|
using System.Text.Json;
|
||||||
|
|
||||||
namespace PARR.API.Controllers.V1
|
namespace PARR.API.Controllers.V1
|
||||||
{
|
{
|
||||||
@@ -34,6 +39,9 @@ namespace PARR.API.Controllers.V1
|
|||||||
private readonly IJobService jobService;
|
private readonly IJobService jobService;
|
||||||
private readonly ITemplateService templateService;
|
private readonly ITemplateService templateService;
|
||||||
private readonly IValidator<JobRequest> jobValidator;
|
private readonly IValidator<JobRequest> jobValidator;
|
||||||
|
private readonly IMqService mqService;
|
||||||
|
private readonly MqSettings mqSettings;
|
||||||
|
private readonly IClientService clientService;
|
||||||
|
|
||||||
public JobController(
|
public JobController(
|
||||||
ILogger<JobController> logger,
|
ILogger<JobController> logger,
|
||||||
@@ -44,7 +52,10 @@ namespace PARR.API.Controllers.V1
|
|||||||
IJobGroupService jobGroupService,
|
IJobGroupService jobGroupService,
|
||||||
IValidator<JobRequest> jobValidator,
|
IValidator<JobRequest> jobValidator,
|
||||||
IUnitFilterService unitFilterService,
|
IUnitFilterService unitFilterService,
|
||||||
IUnitService unitService
|
IUnitService unitService,
|
||||||
|
IMqService mqService,
|
||||||
|
MqSettings mqSettings,
|
||||||
|
IClientService clientService
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
@@ -53,6 +64,9 @@ namespace PARR.API.Controllers.V1
|
|||||||
this.jobService = jobService;
|
this.jobService = jobService;
|
||||||
this.templateService = templateService;
|
this.templateService = templateService;
|
||||||
this.jobValidator = jobValidator;
|
this.jobValidator = jobValidator;
|
||||||
|
this.mqService = mqService;
|
||||||
|
this.mqSettings = mqSettings;
|
||||||
|
this.clientService = clientService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -225,7 +239,13 @@ namespace PARR.API.Controllers.V1
|
|||||||
if (orig == null)
|
if (orig == null)
|
||||||
return BadRequest(new Response(false, new List<ErrorModel> { new ErrorModel { Message = $"Ошибка при изменении задания на выполнение работ. Не найдено задание с Id: {id}" } }));
|
return BadRequest(new Response(false, new List<ErrorModel> { new ErrorModel { Message = $"Ошибка при изменении задания на выполнение работ. Не найдено задание с Id: {id}" } }));
|
||||||
|
|
||||||
|
// если изменили маску шаблона, ниже отправим в очередь, на изменение связанных имен шаблонов
|
||||||
|
var isChangedTemplateNameMask = orig.TemplateNameMask != request.TemplateNameMask.Trim();
|
||||||
|
|
||||||
#region обновление полей задания на работу
|
#region обновление полей задания на работу
|
||||||
|
|
||||||
|
//TODO: ниже if-ы какая то странная история. зачем if-ы, просто приравниваем сразу и все...
|
||||||
|
|
||||||
var changed = false;
|
var changed = false;
|
||||||
|
|
||||||
if (orig.Name != request.Name.Trim())
|
if (orig.Name != request.Name.Trim())
|
||||||
@@ -294,6 +314,13 @@ namespace PARR.API.Controllers.V1
|
|||||||
if (!await jobService.CommitAsync())
|
if (!await jobService.CommitAsync())
|
||||||
return BadRequest(new Response(false, new List<ErrorModel> { new ErrorModel { Message = "Ошибка при изменении задания на выполнение работ." } }));
|
return BadRequest(new Response(false, new List<ErrorModel> { new ErrorModel { Message = "Ошибка при изменении задания на выполнение работ." } }));
|
||||||
|
|
||||||
|
// если изменили маску, отправим задание на переименование связанных шаблонов
|
||||||
|
if (isChangedTemplateNameMask)
|
||||||
|
{
|
||||||
|
var mqResult = await SendRequestToUpdateTemplates(id);
|
||||||
|
//todo: если ошибка. пользователя не предупреждаем... возможно ему это и не нужно знать...ну не переименуются шаблоны, может они переименуются позже...
|
||||||
|
}
|
||||||
|
|
||||||
logger.LogInformation($"Пользователь {User.Identity?.Name} обновил задание на выполнение работ: {orig.Id}," +
|
logger.LogInformation($"Пользователь {User.Identity?.Name} обновил задание на выполнение работ: {orig.Id}," +
|
||||||
$" {orig.Name}, {orig.WorkName}, {orig.MinValueRelationships}, {orig.MaxValueRelationships}," +
|
$" {orig.Name}, {orig.WorkName}, {orig.MinValueRelationships}, {orig.MaxValueRelationships}," +
|
||||||
$" {orig.TemplateNameMask}, {orig.TnkId}, {nameof(orig.GroupId)}");
|
$" {orig.TemplateNameMask}, {orig.TnkId}, {nameof(orig.GroupId)}");
|
||||||
@@ -556,12 +583,45 @@ namespace PARR.API.Controllers.V1
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void BindStatistics(JobResponse job, JobStatModel statistics)
|
private void BindStatistics(JobResponse job, JobStatModel statistics)
|
||||||
{
|
{
|
||||||
//job.TemplateStatistics = new TemplateStats { Activated = statistics.TemplateStatistics.Activated, Errors = statistics.TemplateStatistics.Errors, Synchronized = statistics.TemplateStatistics.Synchronized };
|
//job.TemplateStatistics = new TemplateStats { Activated = statistics.TemplateStatistics.Activated, Errors = statistics.TemplateStatistics.Errors, Synchronized = statistics.TemplateStatistics.Synchronized };
|
||||||
//job.ScheduleStatistics = new ScheduleStats { Activated = statistics.ScheduleStatistics.Activated, Errors = statistics.ScheduleStatistics.Errors, Synchronized = statistics.ScheduleStatistics.Synchronized };
|
//job.ScheduleStatistics = new ScheduleStats { Activated = statistics.ScheduleStatistics.Activated, Errors = statistics.ScheduleStatistics.Errors, Synchronized = statistics.ScheduleStatistics.Synchronized };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private async Task<bool> SendRequestToUpdateTemplates(Guid jobId)
|
||||||
|
{
|
||||||
|
var request = new TemplateMatcherMq
|
||||||
|
{
|
||||||
|
Id = jobId,
|
||||||
|
EntityType = SyncTaskEntityTypeEnum.Job,
|
||||||
|
Action = TemplateMatcherActionEnum.Update,
|
||||||
|
Initiator = new HistoryInitiator
|
||||||
|
{
|
||||||
|
InitiatorIp = clientService.GetClientIp()?.ToString(),
|
||||||
|
InitiatorParrComponentId = ParrComponentsEnum.Api,
|
||||||
|
InitiatorComment = $"В GUI изменено имя шаблона, при сохранении Job отправлен запрос на обновление связанных шаблонов"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var msg = JsonSerializer.Serialize(request);
|
||||||
|
|
||||||
|
var result = await mqService.SendAsync(mqSettings.TemplatesMatcher, new[] { msg });
|
||||||
|
logger.LogDebug("Получен код отпрвки: {IsSuccess}", result.IsSuccess);
|
||||||
|
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
logger.LogError($"Ошибка при отправке запроса в очередь на обновление связанных шаблонов, после обновления маски шаблона. {msg}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.LogInformation($"После изменения маски шаблона в jobId: {jobId}, отправлен запрос в очередь на переименование связанных шаблонов: {msg}");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ namespace PARR.API.Controllers.V1
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Сопоставить текущие шаблоны для Job, создать недостущие шаблоны
|
/// Сопоставить текущие шаблоны для Job, создать недостущие шаблоны
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id">ИД шаблона</param>
|
|
||||||
[HttpPost(ApiRoutes.SyncTask.MatchTemplatesForJob)]
|
[HttpPost(ApiRoutes.SyncTask.MatchTemplatesForJob)]
|
||||||
public async Task<IActionResult> MatchTemplatesForJob([FromRoute] Guid jobId, [FromBody] MatchTemplatesForJobRequest request)
|
public async Task<IActionResult> MatchTemplatesForJob([FromRoute] Guid jobId, [FromBody] MatchTemplatesForJobRequest request)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ namespace PARR.API.Controllers.V1
|
|||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
||||||
.Include(t => t.Orders)
|
.Include(t => t.Orders)
|
||||||
|
.Include(t => t.StatusType)
|
||||||
.OrderBy(t => t.Name)
|
.OrderBy(t => t.Name)
|
||||||
.AsSplitQuery();
|
.AsSplitQuery();
|
||||||
|
|
||||||
@@ -72,6 +73,9 @@ namespace PARR.API.Controllers.V1
|
|||||||
if (filter.JobId.HasValue)
|
if (filter.JobId.HasValue)
|
||||||
query = query.Where(t => t.JobId == filter.JobId);
|
query = query.Where(t => t.JobId == filter.JobId);
|
||||||
|
|
||||||
|
if (filter.StatusTypeId.HasValue)
|
||||||
|
query = query.Where(t => t.StatusTypeId == filter.StatusTypeId);
|
||||||
|
|
||||||
var templates = await templateService.GetPage(query, paginationFilter).ToListAsync();
|
var templates = await templateService.GetPage(query, paginationFilter).ToListAsync();
|
||||||
|
|
||||||
if (!templates.Any())
|
if (!templates.Any())
|
||||||
@@ -98,6 +102,7 @@ namespace PARR.API.Controllers.V1
|
|||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
||||||
.Include(t => t.Orders)
|
.Include(t => t.Orders)
|
||||||
|
.Include(t => t.StatusType)
|
||||||
.AsSplitQuery()
|
.AsSplitQuery()
|
||||||
.FirstOrDefaultAsync(t => t.Id == id);
|
.FirstOrDefaultAsync(t => t.Id == id);
|
||||||
|
|
||||||
@@ -128,6 +133,7 @@ namespace PARR.API.Controllers.V1
|
|||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
||||||
.Include(t => t.Orders)
|
.Include(t => t.Orders)
|
||||||
|
.Include(t => t.StatusType)
|
||||||
.AsSplitQuery()
|
.AsSplitQuery()
|
||||||
.FirstOrDefaultAsync(t => t.Id == id);
|
.FirstOrDefaultAsync(t => t.Id == id);
|
||||||
|
|
||||||
@@ -160,6 +166,7 @@ namespace PARR.API.Controllers.V1
|
|||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.TaskStatus)
|
||||||
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
.Include(t => t.RobotConfigurations).ThenInclude(t => t.RobotStatus)
|
||||||
.Include(t => t.Orders)
|
.Include(t => t.Orders)
|
||||||
|
.Include(t => t.StatusType)
|
||||||
.AsSplitQuery()
|
.AsSplitQuery()
|
||||||
.FirstOrDefaultAsync(t => t.Id == id);
|
.FirstOrDefaultAsync(t => t.Id == id);
|
||||||
|
|
||||||
|
|||||||
50
PARR.API/Controllers/V1/TemplateStatusTypeController.cs
Normal file
50
PARR.API/Controllers/V1/TemplateStatusTypeController.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using PARR.API.Contracts.V1;
|
||||||
|
using PARR.API.Contracts.V1.Responses;
|
||||||
|
using PARR.API.Contracts.V1.Responses.Base;
|
||||||
|
using PARR.API.Controllers.V1.Base;
|
||||||
|
using PARR.Constants;
|
||||||
|
using PARR.DAL.Services.Interfaces;
|
||||||
|
|
||||||
|
namespace PARR.API.Controllers.V1
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Типы статусов шаблонов
|
||||||
|
/// </summary>
|
||||||
|
[Authorize(Roles = ParrRoles.Administrator.Role)]
|
||||||
|
public class TemplateStatusTypeController : BaseApiController
|
||||||
|
{
|
||||||
|
private readonly IMapper mapper;
|
||||||
|
private readonly ITemplateStatusTypeService templateStatusTypeService;
|
||||||
|
|
||||||
|
public TemplateStatusTypeController(
|
||||||
|
IMapper mapper,
|
||||||
|
ITemplateStatusTypeService templateStatusTypeService
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this.mapper = mapper;
|
||||||
|
this.templateStatusTypeService = templateStatusTypeService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Типы статусов шаблонов
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet(ApiRoutes.TemplateStatusType.GetAll)]
|
||||||
|
public async Task<IActionResult> GetAll()
|
||||||
|
{
|
||||||
|
var statusTypes = await templateStatusTypeService.Get().OrderBy(t => t.Description).ToListAsync();
|
||||||
|
|
||||||
|
if (!statusTypes.Any())
|
||||||
|
return NoContent();
|
||||||
|
|
||||||
|
var response = mapper.Map<List<TemplateStatusTypeResponse>>(statusTypes);
|
||||||
|
|
||||||
|
return Ok(new Response<List<TemplateStatusTypeResponse>>(response, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,7 +38,8 @@ namespace PARR.API.MappingProfiles
|
|||||||
.ForMember(d => d.NextRun, o => o.MapFrom(s => s.NextRun))
|
.ForMember(d => d.NextRun, o => o.MapFrom(s => s.NextRun))
|
||||||
.ForMember(d => d.LastRun, o => o.MapFrom(s => s.LastRun))
|
.ForMember(d => d.LastRun, o => o.MapFrom(s => s.LastRun))
|
||||||
.ForMember(d => d.OrderCount, o => o.MapFrom(s => s.Orders.Count()))
|
.ForMember(d => d.OrderCount, o => o.MapFrom(s => s.Orders.Count()))
|
||||||
.ForMember(d => d.IsAutoDistributionEnabled, o => o.MapFrom(s => s.Job!.Group!.IsAutoDistributionEnabled));
|
.ForMember(d => d.IsAutoDistributionEnabled, o => o.MapFrom(s => s.Job!.Group!.IsAutoDistributionEnabled))
|
||||||
|
.ForMember(d => d.StatusType, o => o.MapFrom(s => s.StatusType));
|
||||||
// === Template ===
|
// === Template ===
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +56,12 @@ namespace PARR.API.MappingProfiles
|
|||||||
CreateMap<DAL.Models.TaskStatus, TaskStatusResponse>();
|
CreateMap<DAL.Models.TaskStatus, TaskStatusResponse>();
|
||||||
|
|
||||||
|
|
||||||
|
#region StatusTypeResponse
|
||||||
|
|
||||||
|
CreateMap<TemplateStatusType, TemplateStatusTypeResponse>();
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Tnk
|
#region Tnk
|
||||||
|
|
||||||
CreateMap<Process, ProcessResponse>();
|
CreateMap<Process, ProcessResponse>();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace PARR.API.Settings
|
|||||||
public MqTemplateActivator TemplateActivator { get; set; } = new MqTemplateActivator();
|
public MqTemplateActivator TemplateActivator { get; set; } = new MqTemplateActivator();
|
||||||
public MqStatistics Statistics { get; set; } = new MqStatistics();
|
public MqStatistics Statistics { get; set; } = new MqStatistics();
|
||||||
public MqTemplatesMatcher TemplatesMatcher { get; set; } = new MqTemplatesMatcher();
|
public MqTemplatesMatcher TemplatesMatcher { get; set; } = new MqTemplatesMatcher();
|
||||||
|
public MqTemplatesUpdater TemplatesUpdater { get; set; } = new MqTemplatesUpdater();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MqGenerateTemplates : IMqSettings
|
public class MqGenerateTemplates : IMqSettings
|
||||||
@@ -60,4 +61,13 @@ namespace PARR.API.Settings
|
|||||||
public string Password { get; set; } = string.Empty;
|
public string Password { get; set; } = string.Empty;
|
||||||
public ushort? PrefetchCount { get; set; } = 0;
|
public ushort? PrefetchCount { get; set; } = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class MqTemplatesUpdater : IMqSettings
|
||||||
|
{
|
||||||
|
public string HostName { get; set; } = string.Empty;
|
||||||
|
public string QueueName { get; set; } = string.Empty;
|
||||||
|
public string User { get; set; } = string.Empty;
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
public ushort? PrefetchCount { get; set; } = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,16 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"StorageSettings": {
|
"StorageSettings": {
|
||||||
"StoragePath": "W:\\"
|
"StoragePath": "W:\\"
|
||||||
@@ -33,6 +42,9 @@
|
|||||||
"TemplatesMatcher": {
|
"TemplatesMatcher": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
},
|
},
|
||||||
|
"TemplatesUpdater": {
|
||||||
|
"HostName": "10.99.253.216"
|
||||||
|
},
|
||||||
"Statistics": {
|
"Statistics": {
|
||||||
"StatMqAuth": {
|
"StatMqAuth": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"CorsSettings": {
|
"CorsSettings": {
|
||||||
@@ -63,6 +54,12 @@
|
|||||||
"User": "template_matcher_writer",
|
"User": "template_matcher_writer",
|
||||||
"Password": "8ndd%BpP61Ias;ldk23CkvZM"
|
"Password": "8ndd%BpP61Ias;ldk23CkvZM"
|
||||||
},
|
},
|
||||||
|
"TemplatesUpdater": {
|
||||||
|
"HostName": "parr-rabbitmq",
|
||||||
|
"QueueName": "parr-template-updater",
|
||||||
|
"User": "template_updater_writer",
|
||||||
|
"Password": "sjdhgfkJHGIUFDi14asd^12"
|
||||||
|
},
|
||||||
"Statistics": {
|
"Statistics": {
|
||||||
"StatMqAuth": {
|
"StatMqAuth": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ namespace PARR.DAL
|
|||||||
services.AddTransient<IJobEkMaskService, JobEkMaskService>();
|
services.AddTransient<IJobEkMaskService, JobEkMaskService>();
|
||||||
services.AddTransient<ITemplateHistoryService, TemplateHistoryService>();
|
services.AddTransient<ITemplateHistoryService, TemplateHistoryService>();
|
||||||
services.AddTransient<IParrComponentService, ParrComponentService>();
|
services.AddTransient<IParrComponentService, ParrComponentService>();
|
||||||
|
services.AddTransient<ITemplateStatusTypeService, TemplateStatusTypeService>();
|
||||||
|
|
||||||
#region Unit
|
#region Unit
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using PARR.DAL.Context;
|
||||||
|
using PARR.DAL.Models;
|
||||||
|
using PARR.DAL.Services.Interfaces;
|
||||||
|
|
||||||
|
namespace PARR.DAL.Services.Implementations
|
||||||
|
{
|
||||||
|
internal class TemplateStatusTypeService : ITemplateStatusTypeService
|
||||||
|
{
|
||||||
|
private readonly DataContext dataContext;
|
||||||
|
|
||||||
|
public TemplateStatusTypeService(DataContext dataContext)
|
||||||
|
{
|
||||||
|
this.dataContext = dataContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public IQueryable<TemplateStatusType> Get()
|
||||||
|
{
|
||||||
|
return dataContext.TemplateStatusTypes;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
using PARR.DAL.Models;
|
||||||
|
|
||||||
|
namespace PARR.DAL.Services.Interfaces
|
||||||
|
{
|
||||||
|
public interface ITemplateStatusTypeService
|
||||||
|
{
|
||||||
|
IQueryable<TemplateStatusType> Get();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,5 +7,23 @@
|
|||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WorkerSettings": {
|
"WorkerSettings": {
|
||||||
"RepeatEvery": "1:00:00"
|
"RepeatEvery": "1:00:00"
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"GlobalSettings": {
|
"GlobalSettings": {
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"GlobalSettings": {
|
"GlobalSettings": {
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"StorageSettings": {
|
"StorageSettings": {
|
||||||
"StoragePath": "Data",
|
"StoragePath": "Data",
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"Generator": {
|
"Generator": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WorkerSettings": {
|
"WorkerSettings": {
|
||||||
"RepeatEvery": "6:00:00"
|
"RepeatEvery": "6:00:00"
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -7,5 +7,23 @@
|
|||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"WorkerSettings": {
|
"WorkerSettings": {
|
||||||
"RepeatEvery": "0:50:00"
|
"RepeatEvery": "0:50:00"
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -8,6 +8,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "10.99.253.216"
|
"HostName": "10.99.253.216"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -1,14 +1,32 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs"
|
"RedisConnection": "10.99.253.216:6379,password=ParrP@ssPtk202MMdevDvs"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "Information",
|
"Default": "Information",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
|
||||||
},
|
|
||||||
"MqSettings": {
|
|
||||||
"HostName": "10.99.253.216"
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"MqSettings": {
|
||||||
|
"HostName": "10.99.253.216"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"HostName": "parr-rabbitmq",
|
"HostName": "parr-rabbitmq",
|
||||||
|
|||||||
@@ -6,7 +6,16 @@
|
|||||||
"Microsoft": "Debug",
|
"Microsoft": "Debug",
|
||||||
"Microsoft.Hosting.Lifetime": "Debug"
|
"Microsoft.Hosting.Lifetime": "Debug"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"TemplateMatcher": { "HostName": "10.99.253.216" },
|
"TemplateMatcher": { "HostName": "10.99.253.216" },
|
||||||
|
|||||||
@@ -10,16 +10,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"TemplateMatcher": {
|
"TemplateMatcher": {
|
||||||
|
|||||||
@@ -5,6 +5,24 @@
|
|||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Override": {
|
||||||
|
"Microsoft": "Warning",
|
||||||
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "log/log-.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"TemplateTaskGenerator": { "HostName": "10.99.253.216" },
|
"TemplateTaskGenerator": { "HostName": "10.99.253.216" },
|
||||||
"TemplateGeneratorWorker": { "HostName": "10.99.253.216" }
|
"TemplateGeneratorWorker": { "HostName": "10.99.253.216" }
|
||||||
|
|||||||
@@ -16,16 +16,7 @@
|
|||||||
"Microsoft": "Warning",
|
"Microsoft": "Warning",
|
||||||
"Microsoft.Hosting.Lifetime": "Information"
|
"Microsoft.Hosting.Lifetime": "Information"
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
"WriteTo": [
|
|
||||||
{
|
|
||||||
"Name": "File",
|
|
||||||
"Args": {
|
|
||||||
"path": "log/log-.txt",
|
|
||||||
"rollingInterval": "Day"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"MqSettings": {
|
"MqSettings": {
|
||||||
"TemplateTaskGenerator": {
|
"TemplateTaskGenerator": {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 120s
|
start_period: 120s
|
||||||
deploy:
|
deploy:
|
||||||
replicas: 4
|
replicas: 3
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
delay: 5s
|
delay: 5s
|
||||||
|
|||||||
Reference in New Issue
Block a user