protected function handleJobException($connectionName, $job, WorkerOptions $options, $e)
{
// If we catch an exception, we will attempt to release the job back onto the queue
// so it is not lost entirely. This'll let the job be retried at a later time by
// another listener (or this same one). We will re-throw this exception after.
try {
$this->markJobAsFailedIfHasExceededMaxAttempts($connectionName, $job, (int) $options->maxTries, $e);
$this->raiseExceptionOccurredJobEvent($connectionName, $job, $e);
} finally {
if (!$job->isDeleted()) {
$job->release($options->delay);
}
}
throw $e;
}