public override void Start() { Configuration.Modules.StoveHangfire().Configure(configuration => { configuration.GlobalConfiguration.UseAutofacActivator(Resolver.Resolve <ILifetimeScope>()); Configuration.GetConfigurerIfExists <IStoveHangfireConfiguration>().Invoke(configuration); }); _backgroundWorkerManager.Add(Configuration.Resolver.Resolve <HangfireBackgroundJobManager>()); _backgroundWorkerManager.Add(Configuration.Resolver.Resolve <HangfireScheduleJobManager>()); }
public Task Configured(IConfigure configure) { if (configure.BackgroundJobs.IsJobExecutionEnabled) { _backgroundWorkerManager.Start(); _backgroundWorkerManager.Add(_backgroundJobManager); } return(Task.FromResult(0)); }