We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v3.14.0
NodeJS
Jobs with priority are picked out-of-order after rate limiting with priority.
In my example, I expect job1 to always be processed before job2.
job1
job2
import { Queue, Worker } from 'bullmq' import { setTimeout } from 'node:timers/promises' const host = 'localhost' const password = 'password' // Cleanup // import IORedis from 'ioredis' // const client = new IORedis({ // host, // password // }) // await client.flushdb() const queue = new Queue('myQueue', { connection: { host, password } }) let i = 0 const worker = new Worker( 'myQueue', async job => { i++ console.log(i, 'rate limit', job.name) await setTimeout(20) await worker.rateLimit(1000) throw Worker.RateLimitError() }, { connection: { host, password } } ) console.log('add job1') await queue.add( 'job1', {}, { jobId: 'job1', priority: 10 // works if priority is out-commented } ) await setTimeout(50) console.log('add job2') await queue.add( 'job2', {}, { jobId: 'job2', priority: 10 // works if priority is out-commented } ) await setTimeout(100)
add job1 1 rate limit job1 add job2 2 rate limit job2 3 rate limit job2 ...
Without priority:
add job1 1 rate limit job1 add job2 2 rate limit job1 3 rate limit job1 4 rate limit job1 ...
The text was updated successfully, but these errors were encountered:
Hi @luddd3, I think I understand your case, thanks for bringing this up.
Sorry, something went wrong.
fix(rate-limit): take in count priority (#1919) fixes #1915
b8157a3
chore(release): 3.14.2 [skip ci]
6f4fb3c
## [3.14.2](v3.14.1...v3.14.2) (2023-05-30) ### Bug Fixes * **python:** fix 'install_requires' to include semver ([#1927](#1927)) ([ce86ece](ce86ece)) * **rate-limit:** take in count priority ([#1919](#1919)) fixes [#1915](#1915) ([b8157a3](b8157a3))
Successfully merging a pull request may close this issue.
Version
v3.14.0
Platform
NodeJS
What happened?
Jobs with priority are picked out-of-order after rate limiting with priority.
In my example, I expect
job1
to always be processed beforejob2
.How to reproduce.
Relevant log output
Without priority:
Code of Conduct
The text was updated successfully, but these errors were encountered: