Browse Source

Merge pull request #4036 from abpframework/liangshiwei/background-patch-1

Remove disable background worker system check
pull/4048/head
maliming 6 years ago
committed by GitHub
parent
commit
0f728bbfe8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/AbpBackgroundWorkersQuartzModule.cs

5
framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo/Abp/BackgroundWorkers/Quartz/AbpBackgroundWorkersQuartzModule.cs

@ -17,7 +17,7 @@ namespace Volo.Abp.BackgroundWorkers.Quartz
{
context.Services.AddConventionalRegistrar(new AbpQuartzConventionalRegistrar());
}
public override void OnPreApplicationInitialization(ApplicationInitializationContext context)
{
var options = context.ServiceProvider.GetService<IOptions<AbpBackgroundWorkerOptions>>().Value;
@ -30,9 +30,8 @@ namespace Volo.Abp.BackgroundWorkers.Quartz
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var options = context.ServiceProvider.GetService<IOptions<AbpBackgroundWorkerOptions>>().Value;
var quartzBackgroundWorkerOptions = context.ServiceProvider.GetService<IOptions<AbpBackgroundWorkerQuartzOptions>>().Value;
if (options.IsEnabled && quartzBackgroundWorkerOptions.IsAutoRegisterEnabled)
if (quartzBackgroundWorkerOptions.IsAutoRegisterEnabled)
{
var backgroundWorkerManager = context.ServiceProvider.GetService<IBackgroundWorkerManager>();
var works = context.ServiceProvider.GetServices<IQuartzBackgroundWorker>().Where(x=>x.AutoRegister);

Loading…
Cancel
Save