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

Fix retry when status of job is aborting #1132

Closed

Conversation

medihack
Copy link
Member

Closes #1131

Successful PR Checklist:

  • Tests
    • (not applicable?)
  • Documentation
    • (not applicable?)

PR label(s):

@medihack medihack requested a review from a team as a code owner July 29, 2024 19:07
@github-actions github-actions bot added the PR type: bugfix 🕵️ Contains bug fix label Jul 29, 2024
Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

Copy link
Member

@ewjoachim ewjoachim left a comment

Choose a reason for hiding this comment

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

Code is great but we need to decide whether we want to retry or not. I'm not convinced yet that it makes sense to retry.

Here is my rationale. The following is a timeline.

-> job is deferred

If the job is cancelled here, it is immediately discarded

-> job starts

If the job is cancelled here, it is just marked for abortion. It may not be aborted at all. of course, given the job has started, it makes sense that it is treated differently

-> job ends with an error, is enqueued for retrying (potentially with a delay)

If the job is cancelled here, it is immediately discarder

-> job starts again

What seems strange is that if the job is nearing its end (or error), if you wait for it to end with an error and then cancel it, it will be cancelled sooner that if you cancel it immediately. Similarily, if you cancel it again while it's enqueued for retrying, it will be discarded immediately. A process that requires the user to startegically wait before giving an order for it to be executed sooner or requires the user to request it multiple times seems like procrastinate wouldn't be trying to follow it, I think?

That said, I'm not 100% sure. At all.

@medihack medihack closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR type: bugfix 🕵️ Contains bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retrying a task, that has been aborted
2 participants