예제 #1
0
파일: Worker.cs 프로젝트: eallegretta/Roque
 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;
 }