-
Notifications
You must be signed in to change notification settings - Fork 390
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
feat(queue-events): add retries-exhausted event #1010
Conversation
# [1.65.0](v1.64.4...v1.65.0) (2022-01-21) ### Features * **queue:** add JobType and JobState unions for better typing ([#1011](#1011)) ([3b9b79d](3b9b79d))
src/commands/moveToFinished-8.lua
Outdated
@@ -132,7 +132,7 @@ if rcall("EXISTS",jobIdKey) == 1 then -- // Make sure job exists | |||
rcall("XADD", KEYS[6], "*", "event", ARGV[5], "jobId", jobId, ARGV[3], | |||
ARGV[4]) | |||
|
|||
if ARGV[15] then | |||
if ARGV[15] > 0 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will not happen if the job completed instead of failing right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll verify it
LGTM, although I guess we also need to update QueueEvents with the typings and documentation for this event. |
src/classes/scripts.ts
Outdated
@@ -300,6 +300,9 @@ export class Scripts { | |||
target, | |||
token, | |||
fetchNext, | |||
job.opts.attempts && job.attemptsMade >= job.opts.attempts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will work mostly, but there would be more robust to do this check in the .lua script itself if possible. If it is awkward or hard we could postpone it, but good to have it documented.
I added the event typing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of changes, but I guess they are not so many in practice so it will look better if doing a rebase.
Oh, in reality because I did a rebase from master some of those commits are appearing here, we should be good with a squash, for some reason some of the changes that are already on master are appearing like new changes but they are not |
# [1.66.0](v1.65.1...v1.66.0) (2022-01-23) ### Features * **queue-events:** add retries-exhausted event ([#1010](#1010)) ([e476f35](e476f35))
🎉 This PR is included in version 1.66.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
e476f35 as reference the real changes |
No description provided.