public function schedule(JobAfterFailure $job) { if ($job->numberOfAttempts() <= $this->retryHowManyTimes) { $job->scheduleIn($this->timeToWaitBeforeRetry); } else { $job->archive('tried-too-many-times'); } }
public function schedule(JobAfterFailure $job) { if ($this->isExceptionRetriable($job->causeOfFailure())) { $this->filteredRetryPolicy->schedule($job); } else { $job->archive('non-retriable-exception'); } }
public function schedule(JobAfterFailure $job) { if ($job->numberOfAttempts() <= $this->retryHowManyTimes) { $retryInterval = T\seconds(pow(2, $job->numberOfAttempts() - 1) * $this->timeToInitiallyWaitBeforeRetry->seconds()); $job->scheduleIn($retryInterval); } else { $job->archive('tried-too-many-times'); } }