Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add JobRetry to Client to enable immediate retry of a job #190

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

bgentry
Copy link
Contributor

@bgentry bgentry commented Feb 5, 2024

JobRetry and JobRetryTx will immediately make a job available to be retried again, regardless of the job's current state. The exception is for running jobs which will not be altered. All other jobs will be marked as available and with a scheduled_at no later than now() (jobs with a past scheduled_at will keep it to hold their place in the queue).

The job's max attempts field is incremented if necessary.

JobRetry and JobRetryTx will immediately make a job available to be
retried again, regardless of the job's current state. The exception is
for `running` jobs which will not be altered. All other jobs will be
marked as `available` and with a `scheduled_at` no later than `now()`
(jobs with a past `scheduled_at` will keep it to hold their place in the
queue).

The job's max attempts field is incremented if necessary.
@bgentry bgentry requested a review from brandur February 5, 2024 03:24
Copy link
Contributor

@brandur brandur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM.

@bgentry bgentry merged commit e25eda7 into master Feb 6, 2024
7 checks passed
@bgentry bgentry deleted the bg-job-retry branch February 6, 2024 03:29
brandur added a commit that referenced this pull request Feb 11, 2024
It's been two weeks since our last release and we have a couple nice
features in `master` like a job retrieval API (#186) and a job retry API
(#190). Let's keep the releases rolling. Here, prep `v0.0.19`.
@brandur brandur mentioned this pull request Feb 11, 2024
brandur added a commit that referenced this pull request Feb 11, 2024
It's been two weeks since our last release and we have a couple nice
features in `master` like a job retrieval API (#186) and a job retry API
(#190). Let's keep the releases rolling. Here, prep `v0.0.19`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants