Пример #1
0
        private void ConfigureBackgroundJobs()
        {
            StoveConfiguration.GetConfigurerIfExists <IBackgroundJobConfiguration>().Invoke(StoveConfiguration.BackgroundJobs);

            if (StoveConfiguration.BackgroundJobs.IsJobExecutionEnabled)
            {
                _backgroundWorkerManager.Start();
            }
        }
        public Task Configured(IConfigure configure)
        {
            if (configure.BackgroundJobs.IsJobExecutionEnabled)
            {
                _backgroundWorkerManager.Start();
                _backgroundWorkerManager.Add(_backgroundJobManager);
            }

            return(Task.FromResult(0));
        }