示例#1
0
 /**
  * {@inheritdoc}
  */
 public function handleQueuedMessage(JobContract $job, array $data)
 {
     $this->send($data['view'], $data['data'], $this->getQueuedCallable($data));
     $job->delete();
 }
 /**
  * {@inheritdoc}
  *
  * @codeCoverageIgnore
  */
 public function delete()
 {
     if ($this->job) {
         return $this->job->delete();
     }
 }
示例#3
0
 /**
  * Log a failed job into storage.
  *
  * @param string                       $connection
  * @param \Viserio\Contracts\Queue\Job $job
  *
  * @return void|null
  */
 protected function logFailedJob(string $connection, JobContract $job)
 {
     if ($this->failed === null) {
         return;
     }
     $failedId = $this->failed->log($connection, $job->getQueue(), $job->getRawBody());
     $job->delete();
     $job->failed();
     if ($this->events !== null) {
         $this->events->trigger('viserio.job.failed', ['connection' => $connection, 'job' => $job, 'data' => json_decode($job->getRawBody(), true), 'failedId' => $failedId]);
     }
 }