public void CreateQueueIfNotExists(string name) { if (!_queueManager.Exists(name)) { _queueManager.Create(name); } }
private void StartQueue() { if (_configuration.Workers < 1) { Console.WriteLine("Please add more than one worker to the config!"); return; } var queue = _queueManager.Create(); queue.Add(_workerManager.Spawn(_configuration.Workers)); // register tasks foreach (var task in _configuration.Tasks) { _taskManager.Register(task.Key); foreach (var configuration in task.Value) { queue.Add(_taskManager.Create(task.Key, configuration)); } } }
public ITaskQueue Create(string name) { return(_queueManager.Create(name)); }