refactor(Program): simplify Quartz job registration and add EnvelopeTaskApiJob
- Replaced manual FinishEnvelopeJob Quartz setup with ScheduleJobDefault extension - Added scheduling for EnvelopeTaskApiJob - Updated using directives to include EnvelopeGenerator.Finalizer namespace - Improved maintainability by removing redundant Quartz configuration logic
This commit is contained in:
@@ -23,12 +23,12 @@ public static class Extensions
|
||||
IConfiguration configuration)
|
||||
where TJob : IJob
|
||||
{
|
||||
var expression = configuration[$"{nameof(TJob)}:CronExpression"];
|
||||
var expression = configuration[$"{typeof(TJob).Name}: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(TJob)}:CronExpression'.");
|
||||
$"'{typeof(TJob).FullName}:CronExpression'.");
|
||||
|
||||
return q.ScheduleJobDefault<TJob>(expression);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user