Exemplo n.º 1
0
 public HandlerManager([NotNull] string queueKeyspace,
                       [NotNull] string taskTopic,
                       int maxRunningTasksCount,
                       ILocalTaskQueue localTaskQueue,
                       IHandleTasksMetaStorage handleTasksMetaStorage,
                       IGlobalTime globalTime,
                       ILog logger)
 {
     JobId                       = $"HandlerManager_{queueKeyspace}_{taskTopic}";
     this.taskTopic              = taskTopic;
     this.maxRunningTasksCount   = maxRunningTasksCount;
     this.localTaskQueue         = localTaskQueue;
     this.handleTasksMetaStorage = handleTasksMetaStorage;
     this.globalTime             = globalTime;
     this.logger                 = logger.ForContext(nameof(HandlerManager));
     allTaskIndexShardKeysToRead = allTaskStatesToRead.Select(x => new TaskIndexShardKey(taskTopic, x)).ToArray();
 }
Exemplo n.º 2
0
 public RemoteTaskWithContinuationOptimization([NotNull] Task task, TimeSpan taskTtl, [NotNull] IHandleTaskCollection handleTaskCollection, [NotNull] ILocalTaskQueue localTaskQueue)
     : base(task, taskTtl, handleTaskCollection)
 {
     this.localTaskQueue = localTaskQueue;
 }