Пример #1
0
 /**
  * Log a failed job into storage.
  *
  * @param  string  $connection
  * @param  \Illuminate\Contracts\Queue\Job  $job
  * @return array
  */
 protected function logFailedJob($connection, Job $job)
 {
     if ($this->failer) {
         $this->failer->log($connection, $job->getQueue(), $job->getRawBody());
         $job->delete();
         $this->raiseFailedJobEvent($connection, $job);
     }
     return ['job' => $job, 'failed' => true];
 }
Пример #2
0
 /**
  * Log a failed job into storage.
  *
  * @param  string  $connection
  * @param  \Illuminate\Contracts\Queue\Job  $job
  * @return void
  */
 protected function logFailedJob($connection, Job $job)
 {
     if (!$this->failer) {
         return;
     }
     $failedId = $this->failer->log($connection, $job->getQueue(), $job->getRawBody());
     $job->delete();
     $job->failed();
     $this->raiseFailedJobEvent($connection, $job, $failedId);
 }