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