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
worker.concurrency === undefined
#1552
Comments
I would like to achieve that when the worker is restarted, it does not immediately use the full "Concurrency" and thus generates quite a CPU load. Seen like this: A soft-increase, up to the desired limit. const worker = new Worker("worker", () => {}, {
concurrency: 1
});
const increaseWorkerConcurrencyInterval = setInterval(() => {
if (!worker.opts.concurrency) { return; }
worker.opts.concurrency++;
if (worker.opts.concurrency >= 50) {
clearInterval(increaseWorkerConcurrencyInterval);
}
}, 1000 * 5); |
So what is the issue you have exactly? |
The documentation says |
The documentation says:
is it not working? |
Exactly. It doesn't work like that. |
Are you sure it is not working? We have tests that suggest it works: |
I tried |
Just write a test case that shows it is not working and we will look into it. The tests we have are working, so something you do is different from the current test cases. |
It's working with |
https://docs.bullmq.io/guide/workers/concurrency
I cannot set the "concurrency" as described in the documentation. However, I can set the "concurrency" when I change
worker.opts.concurrency
.Is this the way it is supposed to be?
The text was updated successfully, but these errors were encountered: