Beispiel #1
0
 /**
  * Acknowledges a Job as properly handled
  *
  * @param JobInterface $job Job
  * @return void
  */
 public function processed(JobInterface $job)
 {
     $this->checkConnected();
     $this->client->ackJob($job->getId());
 }
Beispiel #2
0
 /**
  * Marks the job as failed and returns it to the queue
  *
  * This increases the NACK counter of the job
  *
  * @param JobInterface $job
  */
 public function failed(JobInterface $job)
 {
     $this->checkConnected();
     $this->client->nack($job->getId());
 }
 /**
  * @inheritdoc
  */
 public function marshal(JobInterface $job)
 {
     return json_encode($job->getBody());
 }