Example #1
0
 /**
  * Add a job to the queue.
  *
  * @param  JobInterface $job
  * @param  string       $channel
  * @return mixed
  */
 public function dispatch(JobInterface $job, $channel = QueueInterface::MAIN_CHANNEL)
 {
     $dispatched_job_id = $this->dispatcher->dispatch($job->setBatch($this), $channel);
     $this->dispatched_job_ids[] = $dispatched_job_id;
     return $dispatched_job_id;
 }