public System.Threading.Tasks.Task WorkAsync(params string[] queues) { var worker = new Worker(JobCreator, FailureService, Client, queues); Workers.Add(worker); return System.Threading.Tasks.Task.Factory.StartNew(() => worker.Work()); }
public void Work(params string[] queues) { var worker = new Worker(JobCreator, FailureService, Client, queues); Workers.Add(worker); worker.Work(); }