timgit / pg-boss

Queueing jobs in Postgres from Node.js like a boss
MIT License
2.15k stars 160 forks source link

sub queues or queue groups #446

Open dimonnwc3 opened 6 months ago

dimonnwc3 commented 6 months ago

Let's say I have a queue "encode" which has long running tasks. Many users can submit many tasks. I want to load balance tasks between users, by e.g a special "group" key so that one user can't block others for a long time.

10:30 user A submits 10 "encode" tasks 10:31 user B submits 10 "encode" tasks Then user B will wait for all 10 tasks from user A to finish <- I want to prevent this

here is an example of such feature in bullmq: https://docs.bullmq.io/bullmq-pro/groups

is this possible to do and how?