Open bnason opened 5 days ago
The concurrency factor establishes how many jobs are allowed to run concurrently within one worker. If a work is not active, then it is not being considered for the concurrency factor. So I do not think there is an issue here, as the job is waiting and not active.
Is it possible to add an option to count it as "active". For my use case, it is still active, even if technically in bullmq its waiting instead. I'm trying to look at the code to see where I could potentially do that but I'm not seeing anything obvious yet.
@bnason No, that would be really difficult to do as the concurrency mechanics are very tight coupled with the active status.
Is your feature request related to a problem? Please describe. As far as I can tell, when a job changes from active to waiting children, it is no longer counted against the concurrency limit.
Describe the solution you'd like I would like for it to count against it so only 1 job is running or waiting for children.
Here is a reproduction of the problem: https://github.com/bnason/bullmq-concurrency-children-issue As you can see in the logs, both parent jobs run and sit at waiting-children