Ich verwende die Laravel-Warteschlange und während der Job fehlgeschlagen ist, wird es erneut versucht. Kann es nicht erneut versucht werden?
Jawohl.
wie macht man...
Wie kann man dafür sorgen, dass die Laravel-Warteschlange nicht erneut versucht?
/**
* Mark the given job as failed if it has exceeded the maximum allowed attempts.
*
* This will likely be because the job previously exceeded a timeout.
*
* <strong i="6">@param</strong> string $connectionName
* <strong i="7">@param</strong> \Illuminate\Contracts\Queue\Job $job
* <strong i="8">@param</strong> int $maxTries
* <strong i="9">@return</strong> void
*/
protected function markJobAsFailedIfAlreadyExceedsMaxAttempts($connectionName, $job, $maxTries)
{
if ($maxTries === 0 || $job->attempts() <= $maxTries) {
return;
}
$e = new MaxAttemptsExceededException(
'A queued job has been attempted too many times. The job may have previously timed out.'
);
$this->failJob($connectionName, $job, $e);
throw $e;
}
if ($maxTries === 0 || $job->attempts() <= $maxTries)
bedeutet weder 0 noch 1 für --tries param kann dies tun.