Exemplo n.º 1
0
 public void CreateQueueIfNotExists(string name)
 {
     if (!_queueManager.Exists(name))
     {
         _queueManager.Create(name);
     }
 }
Exemplo n.º 2
0
        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));
                }
            }
        }
Exemplo n.º 3
0
 public ITaskQueue Create(string name)
 {
     return(_queueManager.Create(name));
 }