Exemplo n.º 1
0
 /**
  * @param array|null $response
  *
  * @return null
  */
 public function convertResponseToJob($response)
 {
     if (!is_array($response)) {
         return null;
     }
     $job = new Job();
     $job->setQueueName($response[static::FIELD_QUEUE_NAME]);
     $job->setId($response[static::FIELD_ID]);
     $job->setBody($response[static::FIELD_BODY]);
     return $job;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function ackJob(Job $job)
 {
     return $this->ackJobById($job->getId());
 }