Example #1
0
 protected function handleException(QueuedJob $item, Throwable $e)
 {
     $class = (new \ReflectionClass($e))->getShortName();
     Log::warning("Exception executing job ID:{$item->getId()}: {$class} | {$e->getMessage()}");
     $item->decrementAttempts();
     $this->queuedJobRepo->persist($item);
     if ($item->failed()) {
         $class = get_class($item->getJob());
         Log::error("Job ID:{$item->getId()} ({$class}) has failed and will not be retried.");
     }
 }
Example #2
0
 public function delete(QueuedJob $job)
 {
     $job->delete();
 }