Esempio n. 1
0
 public JobQueueManager(
     IOptions <BackgroundJobOptions> options,
     IServiceProvider serviceProvider)
 {
     ServiceProvider = serviceProvider;
     Options         = options.Value;
     JobQueues       = new ConcurrentDictionary <string, IRunnable>();
 }
Esempio n. 2
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;
        }
Esempio n. 3
0
 /// <inheritdoc />
 public ServicesBuilderOptions()
 {
     UowOptions           = new DefaultUnitOfWorkOptions();
     LocalEventBusOptions = new LocalEventBusOptions();
     BackgroundJobOptions = new BackgroundJobOptions();
 }