Ejemplo n.º 1
0
 private function publishBatch()
 {
     // the database transaction needs to be committed before the
     // message is pushed to Rabbit MQ to prevent jobs from being
     // processed by workers before they have been moved to buffered_jobs
     $this->database->publishBatch();
     $this->worker_queue_factory->publishBatch();
     $this->jobs_queued = 0;
 }
Ejemplo n.º 2
0
 /**
  * @covers \Hodor\JobQueue\AbstractQueueFactory
  * @covers \Hodor\JobQueue\WorkerQueueFactory
  */
 public function testWorkerQueueIsReused()
 {
     $this->assertSame($this->worker_queue, $this->worker_queue_factory->getQueue('default-worker'));
 }