Replies: 1 comment 2 replies
-
As you have already suspected there is no built-in mechanism to send commands to workers. This would require an extra communication channel, and I feel it falls outside of the scope of BullMQ at the moment. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Setup:
I have a queue named
Paint
and two node instances running the Worker forPaint
queue with a concurrency of 10 each (i.e total 20 jobs are going to be processed parallel)Problem
Now through a master node instance, I want to change the concurrency of these two
Paint
workers (running on two different node instances) from 10 to 20 so that total 40 jobs can be processed.Possible Solutions with issue
queue.getWorkers()
and then putting a job on each worker specific queue to change concurrency. To generate worker specific queue i thought I can somehow create dynamic queues with a name in the following pattern:workerqueue-${workerId}
and then have each worker process from there own specific queue. But the id fromgetWorkers
is not matching with the id returned byworker.id
.In short I am trying to configure the concurrency of a worker running on one node instance from another node instance (master instance). Is there a way to do this?
Also, is there a way to add meta information to each worker like use our own ID which can become some sort of identification for another node instance. Something we can fetch while calling
queue.getWorkers
?Beta Was this translation helpful? Give feedback.
All reactions