Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements support for job based retry delays. Previously, this was only determined at a worker level via the
--delay
option on the worker command. However, sometimes jobs need to have different failure retry rates for various reasons, such as third-party API limits, etc. This is also in line with allowing job based maximum retries and timeout values.This should allow queued jobs to determine their own retry delay when necessary. This may be done using a simple
retryAfter
property (integer - seconds) on the job class.Or, you may define a
retryAfter
method if more complex logic is required to determine the retry delay. The method may return an integer or a DateTime. If a timestamp is returned, the seconds until that DateTime is used as the delay (e.g.return now()->addSeconds(5)
to delay 5 seconds).Closes laravel/ideas#537