public TimerScheduling(ISchedulerStore <T> schedulerStore, SchedulerOptions schedulerOptions, ILogger <TimerScheduling <T> > log, IClock clock) { this.schedulerStore = schedulerStore; this.schedulerOptions = schedulerOptions; this.clock = clock; this.log = log; }
public TimerScheduler(ISchedulerStore <T> schedulerStore, SchedulerOptions schedulerOptions, IClock clock, ISemanticLog log) { this.schedulerStore = schedulerStore; this.schedulerOptions = schedulerOptions; actionBlock = new ActionBlock <SchedulerBatch <T> >(HandleAsync, new ExecutionDataflowBlockOptions { BoundedCapacity = schedulerOptions.MaxParallelism * 4, MaxDegreeOfParallelism = schedulerOptions.MaxParallelism, MaxMessagesPerTask = 1 }); this.clock = clock; this.log = log; }
public TimerConsumer(ISchedulerStore <T> schedulerStore, SchedulerOptions schedulerOptions, ScheduleSuccessCallback <T> onSuccess, ScheduleErrorCallback <T> onError, ILogger log, IClock clock) { this.schedulerStore = schedulerStore; this.schedulerOptions = schedulerOptions; this.onSuccess = onSuccess; this.onError = onError; activity = $"Scheduler.Query({schedulerOptions.QueueName})"; actionBlock = new ActionBlock <SchedulerBatch <T> >(async batch => { using (Telemetry.Activities.StartActivity(activity)) { try { await HandleAsync(batch); } catch (OperationCanceledException ex) { throw new AggregateException(ex); } } }, new ExecutionDataflowBlockOptions { BoundedCapacity = schedulerOptions.MaxParallelism * 4, MaxDegreeOfParallelism = schedulerOptions.MaxParallelism, MaxMessagesPerTask = 1 }); this.clock = clock; this.log = log; }
public MessageScheduler(ISchedulerStore schedulerStore) { _schedulerStore = schedulerStore; }