If a queue has an args-based global partition, do jobs running in other queues interfere with the global limit?

Hey!

I have a question about Global Partitioning:

If a queue has an args-based global partition, do jobs with the same args running in other queues interfere with the global limit?

Let’s go through an example. Let’s say I have these two queues a and b:

queues: [
  a: [
    global_limit: [allowed: 1, partition: [fields: [:args], keys: [:company_id]]],
  ],
  b: [
    local_limit: 10
  ]
]

Now imagine that a job with args %{company_id: 1} is being executed on queue b. Given the queue config above, would that prevent another job with the same company_id in args from being executed on queue a until the former job finishes its execution?

Thanks!

Nope, partitioning is entirely separated by queue. You could accomplish strictly sequential execution, partitioned by conpany_id with a global limit by using the Chain worker.

There’s a section in the guide about optimizing chains which discusses that exact use case.

1 Like