コード例 #1
0
ファイル: Superqueue.php プロジェクト: lightster/hodor
 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;
 }
コード例 #2
0
ファイル: WorkerQueueTest.php プロジェクト: lightster/hodor
 /**
  * @covers \Hodor\JobQueue\AbstractQueueFactory
  * @covers \Hodor\JobQueue\WorkerQueueFactory
  */
 public function testWorkerQueueIsReused()
 {
     $this->assertSame($this->worker_queue, $this->worker_queue_factory->getQueue('default-worker'));
 }