refactor(Worker): rename as FinishEnvelopeJob
This commit is contained in:
parent
86c9fdfcd7
commit
cce2f8f90e
@ -30,6 +30,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<Folder Include="Controllers\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@ -1,14 +1,12 @@
|
||||
using EnvelopeGenerator.Finalizer.Models;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Quartz;
|
||||
|
||||
namespace EnvelopeGenerator.Finalizer
|
||||
namespace EnvelopeGenerator.Finalizer.Job
|
||||
{
|
||||
public class Worker : IJob
|
||||
public class FinishEnvelopeJob : IJob
|
||||
{
|
||||
private readonly ILogger<Worker> _logger;
|
||||
private readonly ILogger<FinishEnvelopeJob> _logger;
|
||||
|
||||
public Worker(ILogger<Worker> logger)
|
||||
public FinishEnvelopeJob(ILogger<FinishEnvelopeJob> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
using CommandDotNet.Execution;
|
||||
using EnvelopeGenerator.Application.ThirdPartyModules.Queries;
|
||||
using EnvelopeGenerator.DependencyInjection;
|
||||
using EnvelopeGenerator.Finalizer;
|
||||
using EnvelopeGenerator.Finalizer.Job;
|
||||
using EnvelopeGenerator.Finalizer.Models;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using MediatR;
|
||||
@ -46,19 +46,19 @@ try
|
||||
builder.Services.AddSwaggerGen();
|
||||
#endregion
|
||||
|
||||
#region AQuartz
|
||||
#region Quartz
|
||||
builder.Services.AddQuartz(q =>
|
||||
{
|
||||
var name = $"{typeof(Worker).FullName}";
|
||||
var name = $"{typeof(FinishEnvelopeJob).FullName}";
|
||||
var jobKey = new JobKey(name);
|
||||
q.AddJob<Worker>(opts => opts.WithIdentity(jobKey));
|
||||
q.AddJob<FinishEnvelopeJob>(opts => opts.WithIdentity(jobKey));
|
||||
|
||||
var expression = config[nameof(Worker) + ":CronExpression"];
|
||||
var expression = config[nameof(FinishEnvelopeJob) + ":CronExpression"];
|
||||
if (string.IsNullOrWhiteSpace(expression))
|
||||
throw new InvalidOperationException(
|
||||
"Cron expression for the Worker job is not configured. " +
|
||||
"Please provide a valid cron schedule in the configuration under " +
|
||||
$"'{nameof(Worker)}:CronExpression'.");
|
||||
$"'{nameof(FinishEnvelopeJob)}:CronExpression'.");
|
||||
|
||||
q.AddTrigger(opts => opts
|
||||
.ForJob(jobKey)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"Worker": {
|
||||
"FinishEnvelopeJob": {
|
||||
"CronExpression": "* * * * * ?"
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"UseDbMigration": false,
|
||||
"ConnectionStrings": {
|
||||
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;",
|
||||
"DbMigrationTest": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
|
||||
},
|
||||
"DbTriggerParams": {
|
||||
"Envelope": [ "TBSIG_ENVELOPE_AFT_INS" ],
|
||||
"History": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ],
|
||||
"EmailOut": [ "TBEMLP_EMAIL_OUT_AFT_INS", "TBEMLP_EMAIL_OUT_AFT_UPD" ],
|
||||
"EnvelopeReceiverReadOnly": [ "TBSIG_ENVELOPE_RECEIVER_READ_ONLY_UPD" ],
|
||||
"Receiver": [],
|
||||
"EmailTemplate": [ "TBSIG_EMAIL_TEMPLATE_AFT_UPD" ]
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,81 +0,0 @@
|
||||
{
|
||||
"Serilog": {
|
||||
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
|
||||
"MinimumLevel": {
|
||||
"Default": "Verbose",
|
||||
"Override": {
|
||||
"Microsoft": "Warning",
|
||||
"System": "Warning"
|
||||
}
|
||||
},
|
||||
"WriteTo": [
|
||||
{
|
||||
"Name": "Console",
|
||||
"Args": {
|
||||
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "E:/LogFiles/Digital Data/signFlow.Finalizer/log.Verbose-.txt",
|
||||
"rollingInterval": "Day",
|
||||
"restrictedToMinimumLevel": "Verbose",
|
||||
"retainedFileCountLimit": 30,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "E:/LogFiles/Digital Data/signFlow.Finalizer/log.Debug-.txt",
|
||||
"rollingInterval": "Day",
|
||||
"restrictedToMinimumLevel": "Debug",
|
||||
"retainedFileCountLimit": 30,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "E:/LogFiles/Digital Data/signFlow.Finalizer/log.Info-.txt",
|
||||
"rollingInterval": "Day",
|
||||
"restrictedToMinimumLevel": "Information",
|
||||
"retainedFileCountLimit": 30,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "E:/LogFiles/Digital Data/signFlow.Finalizer/log.Warning-.txt",
|
||||
"rollingInterval": "Day",
|
||||
"restrictedToMinimumLevel": "Warning",
|
||||
"retainedFileCountLimit": 30,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "E:/LogFiles/Digital Data/signFlow.Finalizer/log.Error-.txt",
|
||||
"rollingInterval": "Day",
|
||||
"restrictedToMinimumLevel": "Error",
|
||||
"retainedFileCountLimit": 30,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "File",
|
||||
"Args": {
|
||||
"path": "E:/LogFiles/Digital Data/signFlow.Finalizer/log.Fatal-.txt",
|
||||
"rollingInterval": "Day",
|
||||
"restrictedToMinimumLevel": "Fatal",
|
||||
"retainedFileCountLimit": 30,
|
||||
"outputTemplate": "[{Timestamp:yyyy-MM-dd HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
{
|
||||
"IgnoredLabels": {
|
||||
"Label": [
|
||||
"Date",
|
||||
"Datum",
|
||||
"ZIP",
|
||||
"PLZ",
|
||||
"Place",
|
||||
"Ort",
|
||||
"Position",
|
||||
"Stellung"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user