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

Redo: When not preserving job records, ensure all prior executions are deleted after successful retry #730

Merged
merged 2 commits into from
Oct 22, 2022

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Oct 20, 2022

This undoes the reversion of #719 in #729, informed by #728.

Newly, this covers the case when ActiveJob::Base#reenqueue is called directly during job execution (not via retry_job), which I had not considered initially.

@bensheldon bensheldon temporarily deployed to goodjob-redo-execution--v4foct October 20, 2022 15:13 Inactive
@@ -296,13 +297,14 @@ def perform
job_error = result.handled_error || result.unhandled_error
self.error = [job_error.class, ERROR_MESSAGE_SEPARATOR, job_error.message].join if job_error

reenqueued = result.retried? || retried_good_job_id.present?
Copy link
Owner Author

Choose a reason for hiding this comment

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

This is the significant change in this PR from the previously reverted PR.

@bensheldon bensheldon merged commit 6e5ea14 into main Oct 22, 2022
@bensheldon bensheldon deleted the redo_execution_cleanup branch October 22, 2022 20:36
@bensheldon bensheldon added the bug Something isn't working label Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging this pull request may close these issues.

1 participant