-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
rate limiting? #329
Labels
Comments
I am also interested in this. Have you ever find a solution with bull or any other library? |
Have you seen #335 that just got merged? You can give the job a unique key and a delay, so if you add a job with that same id that is currently queued, it won't do anything. So basically throttling. cc @pricj004 |
Closing due to being a duplicate of #362 |
leahciMic
pushed a commit
to leahciMic/bull
that referenced
this issue
Nov 28, 2016
Fix OptimalBits#362 Fix OptimalBits#329 This commit adds support for rate limiting of a queue. The rate limit applies to each instance of the queue. If you have 3 threads processing the queue, and you want to limit your jobs to 1 per second, it will be 1 job per second amongst the 3 threads. queue#process first argument has been changed to an options object, and concurrency now resides within this object, as well as the new rate limiting options. (If a number is specified as the first argument to queue#process, it will be treated as the old version of the API which I have deprecated in favor of passing in the options object).
leahciMic
pushed a commit
to leahciMic/bull
that referenced
this issue
Feb 15, 2017
Fix OptimalBits#362 Fix OptimalBits#329 This commit adds support for rate limiting of a queue. The rate limit applies to each instance of the queue. If you have 3 threads processing the queue, and you want to limit your jobs to 1 per second, it will be 1 job per second amongst the 3 threads. queue#process first argument has been changed to an options object, and concurrency now resides within this object, as well as the new rate limiting options. (If a number is specified as the first argument to queue#process, it will be treated as the old version of the API which I have deprecated in favor of passing in the options object).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to limit a job (keyed on an argument) to only run x times a period? does bull have a plugin framework so commonly used functions can be shared across jobs?
The text was updated successfully, but these errors were encountered: