本文整理匯總了PHP中Illuminate\Contracts\Queue\Job::isDeleted方法的典型用法代碼示例。如果您正苦於以下問題:PHP Job::isDeleted方法的具體用法?PHP Job::isDeleted怎麽用?PHP Job::isDeleted使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Contracts\Queue\Job
的用法示例。
在下文中一共展示了Job::isDeleted方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: failJob
/**
* Mark the given job as failed and raise the relevant event.
*
* @param string $connectionName
* @param \Illuminate\Contracts\Queue\Job $job
* @param \Exception $e
* @return void
*/
protected function failJob($connectionName, $job, $e)
{
if ($job->isDeleted()) {
return;
}
try {
// If the job has failed, we will delete it, call the "failed" method and then call
// an event indicating the job has failed so it can be logged if needed. This is
// to allow every developer to better keep monitor of their failed queue jobs.
$job->delete();
$job->failed($e);
} finally {
$this->raiseFailedJobEvent($connectionName, $job, $e);
}
}