Refactored Quartz instance id to AUTO, removed constant
continuous-integration/drone/pr Build is passing
continuous-integration/drone/pr Build is passing
This commit is contained in:
@@ -5,7 +5,6 @@ public static class Constants
|
|||||||
public const int QueueBounds = 100000;
|
public const int QueueBounds = 100000;
|
||||||
|
|
||||||
public const string ShopSchedulerName = "shop";
|
public const string ShopSchedulerName = "shop";
|
||||||
public const string ShopSchedulerInstanceId = "golden-dawn";
|
|
||||||
|
|
||||||
public const string EmailServiceBus = nameof(EmailServiceBus);
|
public const string EmailServiceBus = nameof(EmailServiceBus);
|
||||||
public const string GeneralServiceBus = nameof(GeneralServiceBus);
|
public const string GeneralServiceBus = nameof(GeneralServiceBus);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ public static class Quartz
|
|||||||
{
|
{
|
||||||
private const string databaseConfigName = "PostgresScheduler";
|
private const string databaseConfigName = "PostgresScheduler";
|
||||||
|
|
||||||
public static IServiceCollection AddQuartzSchedulerClient(this IServiceCollection services, string schedulerName, string schedulerId, IConfiguration configuration)
|
public static IServiceCollection AddQuartzSchedulerClient(this IServiceCollection services, string schedulerName, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
var connectionString = configuration.GetConnectionString(databaseConfigName);
|
var connectionString = configuration.GetConnectionString(databaseConfigName);
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ public static class Quartz
|
|||||||
services.AddQuartz(config =>
|
services.AddQuartz(config =>
|
||||||
{
|
{
|
||||||
config.SchedulerName = schedulerName;
|
config.SchedulerName = schedulerName;
|
||||||
config.SchedulerId = schedulerId;
|
config.SchedulerId = "AUTO";
|
||||||
|
|
||||||
config.UseSimpleTypeLoader();
|
config.UseSimpleTypeLoader();
|
||||||
config.UseDefaultThreadPool(options => options.MaxConcurrency = 0);
|
config.UseDefaultThreadPool(options => options.MaxConcurrency = 0);
|
||||||
@@ -42,7 +42,7 @@ public static class Quartz
|
|||||||
return services;
|
return services;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IServiceCollection AddQuartzScheduler(this IServiceCollection services, string schedulerName, string schedulerId, IConfiguration configuration)
|
public static IServiceCollection AddQuartzScheduler(this IServiceCollection services, string schedulerName, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
var connectionString = configuration.GetConnectionString(databaseConfigName);
|
var connectionString = configuration.GetConnectionString(databaseConfigName);
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ public static class Quartz
|
|||||||
services.AddQuartz(config =>
|
services.AddQuartz(config =>
|
||||||
{
|
{
|
||||||
config.SchedulerName = schedulerName;
|
config.SchedulerName = schedulerName;
|
||||||
config.SchedulerId = schedulerId;
|
config.SchedulerId = "AUTO";
|
||||||
config.InterruptJobsOnShutdown = true;
|
config.InterruptJobsOnShutdown = true;
|
||||||
config.InterruptJobsOnShutdownWithWait = true;
|
config.InterruptJobsOnShutdownWithWait = true;
|
||||||
config.MaxBatchSize = 5;
|
config.MaxBatchSize = 5;
|
||||||
|
|||||||
Reference in New Issue
Block a user