feat(quartz): integrate Quartzmon dashboard and CommandDotNet

- Added `Quartzmon` package and configured its middleware for job monitoring.
- Integrated `CommandDotNet.Execution` for command-line execution support.
- Updated using directives and service registrations accordingly.
- Preserved existing Serilog logging, DB context, and EnvelopeGenerator setup.
This commit is contained in:
Developer 02 2025-11-04 17:29:07 +01:00
parent 7d5b988842
commit 89ec887510
2 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="Quartz.AspNetCore" Version="3.15.1" />
<PackageReference Include="Quartzmon" Version="1.0.5" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.10" />

View File

@ -1,3 +1,4 @@
using CommandDotNet.Execution;
using EnvelopeGenerator.Application.ThirdPartyModules.Queries;
using EnvelopeGenerator.DependencyInjection;
using EnvelopeGenerator.Finalizer;
@ -7,6 +8,8 @@ using MediatR;
using Microsoft.EntityFrameworkCore;
using Quartz;
using Quartz.AspNetCore;
using Quartz.Impl;
using Quartzmon;
using Serilog;
// Load Serilog from appsettings.json
@ -67,6 +70,8 @@ try
{
options.WaitForJobsToComplete = true;
});
builder.Services.AddQuartzmon();
#endregion
#region Add DB Context, EG Inf. and Services
@ -125,6 +130,12 @@ try
app.UseAuthorization();
app.UseQuartzmon(new QuartzmonOptions()
{
Scheduler = StdSchedulerFactory.GetDefaultScheduler().Result,
VirtualPathRoot = "/quartz"
});
app.MapControllers();
#endregion