initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Indotalent.Infrastructure.BackgroundJob;
|
||||
|
||||
public class BackgroundJobService(IOptions<BackgroundJobSettingsModel> options)
|
||||
{
|
||||
private readonly BackgroundJobSettingsModel _settings = options.Value;
|
||||
|
||||
public BackgroundJobSettingsModel GetConfiguration() => _settings;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Indotalent.Infrastructure.BackgroundJob.Hangfire;
|
||||
using Indotalent.Infrastructure.BackgroundJob.Quartz;
|
||||
|
||||
namespace Indotalent.Infrastructure.BackgroundJob;
|
||||
|
||||
public class BackgroundJobSettingsModel
|
||||
{
|
||||
public HangfireSettingsModel Hangfire { get; set; } = new();
|
||||
public QuartzSettingsModel Quartz { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Indotalent.Infrastructure.BackgroundJob;
|
||||
|
||||
public static class DI
|
||||
{
|
||||
public static IServiceCollection AddBackgroundJobService(this IServiceCollection services)
|
||||
{
|
||||
services.AddScoped<BackgroundJobService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Indotalent.Infrastructure.BackgroundJob.Hangfire;
|
||||
|
||||
public class HangfireSettingsModel
|
||||
{
|
||||
public bool IsUsed { get; set; }
|
||||
public string ConnectionString { get; set; } = string.Empty;
|
||||
public string DashboardPath { get; set; } = "/hangfire";
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Indotalent.Infrastructure.BackgroundJob.Quartz;
|
||||
|
||||
public class QuartzSettingsModel
|
||||
{
|
||||
public bool IsUsed { get; set; }
|
||||
public string TablePrefix { get; set; } = "QRTZ_";
|
||||
}
|
||||
Reference in New Issue
Block a user