|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Hangfire;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
@ -13,6 +14,12 @@ namespace Volo.Abp.BackgroundJobs.Hangfire
|
|
|
|
|
)]
|
|
|
|
|
public class AbpBackgroundJobsHangfireModule : AbpModule
|
|
|
|
|
{
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context)
|
|
|
|
|
{
|
|
|
|
|
context.Services.AddTransient(serviceProvider =>
|
|
|
|
|
serviceProvider.GetRequiredService<AbpDashboardOptionsProvider>().Get());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void OnPreApplicationInitialization(ApplicationInitializationContext context)
|
|
|
|
|
{
|
|
|
|
|
var options = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>().Value;
|
|
|
|
@ -29,4 +36,4 @@ namespace Volo.Abp.BackgroundJobs.Hangfire
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|