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

perf(retry): delete props in retryJob lua script #1016

Merged
merged 3 commits into from
Jan 27, 2022

Conversation

roggervalf
Copy link
Collaborator

No description provided.

@@ -20,6 +21,7 @@ if (rcall("EXISTS", KEYS[1]) == 1) then
local jobId = ARGV[1]
if (rcall("ZREM", KEYS[3], jobId) == 1) then
rcall(ARGV[2], KEYS[4], jobId)
rcall("HDEL", KEYS[1], "finishedOn", "processedOn", ARGV[3])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably we should set attempstMade as 0 too, what do you think @manast ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, why would we like to reset the number of attempts here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if the job failed after the last attempt, if we retry the job, it would keep the last maximum attempt number

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as we are not going to reset the attempstMade, this pr should be ready

@@ -844,23 +844,16 @@ export class Job<
/**
* Attempts to retry the job. Only a job that has failed can be retried.
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we can actually retry completed jobs, this comment is incorrect right now.

@roggervalf roggervalf merged commit 547cedd into master Jan 27, 2022
@roggervalf roggervalf deleted the perf-hdel-in-retry-job branch January 27, 2022 00:09
github-actions bot pushed a commit that referenced this pull request Jan 27, 2022
## [1.67.1](v1.67.0...v1.67.1) (2022-01-27)

### Bug Fixes

* **retry:** pass state in error message ([#1027](#1027)) ([c646a45](c646a45))

### Performance Improvements

* **retry:** delete props in retryJob lua script ([#1016](#1016)) ([547cedd](547cedd))
@github-actions
Copy link

🎉 This PR is included in version 1.67.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants