Example #1
0
 /**
  * @param string $channelType
  * @param BlockingJobsInterface $blockingJobProvider
  *
  * @return $this
  */
 public function addJob($channelType, BlockingJobsInterface $blockingJobProvider)
 {
     if (!$this->jobs->containsKey($channelType)) {
         $this->jobs->set($channelType, $blockingJobProvider);
     } else {
         throw new LogicException(sprintf('Trying to redeclare blockingJob provider  "%s".', $channelType));
     }
     return $this;
 }
 private function clearQueue($queueName)
 {
     if ($this->queues->containsKey($queueName)) {
         $this->queues[$queueName] = new ArrayCollection();
     }
 }