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

feat(queue-events): add retries-exhausted event #1010

Merged
merged 17 commits into from
Jan 23, 2022
Merged

Conversation

roggervalf
Copy link
Collaborator

No description provided.

@roggervalf roggervalf changed the title test(backoff): add case when attempts is 1 feat(queue-events): add retries-exhausted event Jan 21, 2022
@@ -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
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll verify it

@manast
Copy link
Contributor

manast commented Jan 22, 2022

LGTM, although I guess we also need to update QueueEvents with the typings and documentation for this event.

@@ -300,6 +300,9 @@ export class Scripts {
target,
token,
fetchNext,
job.opts.attempts && job.attemptsMade >= job.opts.attempts
Copy link
Contributor

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.

@roggervalf
Copy link
Collaborator Author

LGTM, although I guess we also need to update QueueEvents with the typings and documentation for this event.

I added the event typing

Copy link
Contributor

@manast manast left a 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.

@roggervalf
Copy link
Collaborator Author

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

@roggervalf roggervalf merged commit e476f35 into master Jan 23, 2022
@roggervalf roggervalf deleted the test-retry-1-case branch January 23, 2022 04:18
github-actions bot pushed a commit that referenced this pull request Jan 23, 2022
# [1.66.0](v1.65.1...v1.66.0) (2022-01-23)

### Features

* **queue-events:** add retries-exhausted event ([#1010](#1010)) ([e476f35](e476f35))
@github-actions
Copy link

🎉 This PR is included in version 1.66.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@roggervalf
Copy link
Collaborator Author

e476f35 as reference the real changes

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.

4 participants