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(rate-limit): move job to wait even if ttl is 0 #2403

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

roggervalf
Copy link
Collaborator

When returning a rate limit error we must move the job from active to wait, independently of the ttl value, in case we don't move , the job will get stalled or could fail if we have maxStalledCount as 0

async pause(pause: boolean): Promise<void> {
const client = await this.queue.client;

protected pauseArgs(pause: boolean): (string | 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.

this change is just to separate args from actual command call

@roggervalf roggervalf merged commit c1c2ccc into master Jan 31, 2024
11 checks passed
@roggervalf roggervalf deleted the fix-move-from-active branch January 31, 2024 00:26
github-actions bot pushed a commit that referenced this pull request Jan 31, 2024
## [5.1.6](v5.1.5...v5.1.6) (2024-01-31)

### Bug Fixes

* **rate-limit:** move job to wait even if ttl is 0 ([#2403](#2403)) ([c1c2ccc](c1c2ccc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant