public HangfireJobExecutionAdapter(IOptions <BackgroundJobOptions> options,
                                    IBackgroundJobExecuter jobExecuter, IServiceScopeFactory serviceScopeFactory)
 {
     JobExecuter         = jobExecuter;
     ServiceScopeFactory = serviceScopeFactory;
     Options             = options.Value;
 }
 public QuartzJobExecutionAdapter(
     IOptions <RocketBackgroundJobOptions> options,
     IBackgroundJobExecuter jobExecuter,
     IServiceScopeFactory serviceScopeFactory)
 {
     JobExecuter         = jobExecuter;
     ServiceScopeFactory = serviceScopeFactory;
     Options             = options.Value;
 }
Example #3
0
 public QuartzJobExecutionAdapter(
     IOptions <AbpBackgroundJobOptions> options,
     IOptions <AbpBackgroundJobQuartzOptions> backgroundJobQuartzOptions,
     IBackgroundJobExecuter jobExecuter,
     IServiceScopeFactory serviceScopeFactory)
 {
     JobExecuter                = jobExecuter;
     ServiceScopeFactory        = serviceScopeFactory;
     Options                    = options.Value;
     BackgroundJobQuartzOptions = backgroundJobQuartzOptions.Value;
     Logger = NullLogger <QuartzJobExecutionAdapter <TArgs> > .Instance;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultBackgroundJobManager"/> class.
 /// </summary>
 public BackgroundJobWorker(
     IBackgroundJobStore store,
     AbpTimer timer,
     IBackgroundJobExecuter jobExecuter,
     IBackgroundJobSerializer serializer,
     IOptions <BackgroundJobOptions> jobOptions,
     IOptions <BackgroundJobWorkerOptions> workerOptions,
     IClock clock)
     : base(timer)
 {
     JobExecuter   = jobExecuter;
     Serializer    = serializer;
     Clock         = clock;
     Store         = store;
     WorkerOptions = workerOptions.Value;
     JobOptions    = jobOptions.Value;
     Timer.Period  = WorkerOptions.JobPollPeriod;
 }
Example #5
0
 public BackgroundJobWorker(
     AbpTimer timer,
     IBackgroundJobExecuter jobExecuter,
     IBackgroundJobSerializer serializer,
     IOptions <BackgroundJobOptions> jobOptions,
     IOptions <BackgroundJobWorkerOptions> workerOptions,
     IClock clock,
     IServiceScopeFactory serviceScopeFactory)
     : base(timer)
 {
     JobExecuter         = jobExecuter;
     Serializer          = serializer;
     Clock               = clock;
     ServiceScopeFactory = serviceScopeFactory;
     WorkerOptions       = workerOptions.Value;
     JobOptions          = jobOptions.Value;
     Timer.Period        = WorkerOptions.JobPollPeriod;
 }
Example #6
0
        public JobQueue(
            IOptions <BackgroundJobOptions> backgroundJobOptions,
            IOptions <RabbitMqBackgroundJobOptions> rabbitMqBackgroundJobOptions,
            IChannelPool channelPool,
            IRabbitMqSerializer serializer,
            IBackgroundJobExecuter jobExecuter)
        {
            BackgroundJobOptions         = backgroundJobOptions.Value;
            RabbitMqBackgroundJobOptions = rabbitMqBackgroundJobOptions.Value;
            Serializer  = serializer;
            JobExecuter = jobExecuter;
            ChannelPool = channelPool;

            JobConfiguration   = BackgroundJobOptions.GetJob(typeof(TArgs));
            QueueConfiguration = GetOrCreateJobQueueConfiguration();

            Logger = NullLogger <JobQueue <TArgs> > .Instance;
        }
Example #7
0
File: JobQueue.cs Project: zxbe/abp
        public JobQueue(
            IOptions <AbpBackgroundJobOptions> backgroundJobOptions,
            IOptions <AbpRabbitMqBackgroundJobOptions> rabbitMqAbpBackgroundJobOptions,
            IChannelPool channelPool,
            IRabbitMqSerializer serializer,
            IBackgroundJobExecuter jobExecuter,
            IServiceScopeFactory serviceScopeFactory)
        {
            AbpBackgroundJobOptions         = backgroundJobOptions.Value;
            AbpRabbitMqBackgroundJobOptions = rabbitMqAbpBackgroundJobOptions.Value;
            Serializer          = serializer;
            JobExecuter         = jobExecuter;
            ServiceScopeFactory = serviceScopeFactory;
            ChannelPool         = channelPool;

            JobConfiguration   = AbpBackgroundJobOptions.GetJob(typeof(TArgs));
            QueueConfiguration = GetOrCreateJobQueueConfiguration();

            Logger = NullLogger <JobQueue <TArgs> > .Instance;
        }
Example #8
0
        public JobQueue(
            IOptions <RocketBackgroundJobOptions> backgroundJobOptions,
            IOptions <RocketRabbitMqBackgroundJobOptions> rabbitMqRocketBackgroundJobOptions,
            IChannelPool channelPool,
            IRabbitMqSerializer serializer,
            IBackgroundJobExecuter jobExecuter,
            IServiceScopeFactory serviceScopeFactory,
            IExceptionNotifier exceptionNotifier)
        {
            RocketBackgroundJobOptions         = backgroundJobOptions.Value;
            RocketRabbitMqBackgroundJobOptions = rabbitMqRocketBackgroundJobOptions.Value;
            Serializer          = serializer;
            JobExecuter         = jobExecuter;
            ServiceScopeFactory = serviceScopeFactory;
            ExceptionNotifier   = exceptionNotifier;
            ChannelPool         = channelPool;

            JobConfiguration   = RocketBackgroundJobOptions.GetJob(typeof(TArgs));
            QueueConfiguration = GetOrCreateJobQueueConfiguration();

            Logger = NullLogger <JobQueue <TArgs> > .Instance;
        }
 public BackgroundJobExecuter_Tests()
 {
     _backgroundJobExecuter = GetRequiredService <IBackgroundJobExecuter>();
 }
Example #10
0
 public HangfireJobExecutionAdapter(IOptions <BackgroundJobOptions> options, IBackgroundJobExecuter jobExecuter)
 {
     JobExecuter = jobExecuter;
     Options     = options.Value;
 }