Пример #1
0
 private Worker(string name, Queue queue, int tooManyErrors = 10, int tooManyErrorsRetrySeconds = 30)
 {
     this.Name = name;
     this.Queue = queue;
     this.TooManyErrors = tooManyErrors;
     this.TooManyErrorsRetrySeconds = tooManyErrorsRetrySeconds;
 }
Пример #2
0
 private Worker(string name, Queue queue, int tooManyErrors = 10, int tooManyErrorsRetrySeconds = 30)
 {
     if (_Instances.ContainsKey(name))
     {
         throw new Exception("Worker name already exists: " + name);
     }
     this.Name = name;
     this.Queue = queue;
     this.TooManyErrors = tooManyErrors;
     this.TooManyErrorsRetrySeconds = tooManyErrorsRetrySeconds;
     _Instances[Name] = this;
 }