Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Priorities of queues with sidekiq

With sidekiq is there any configuration for a queue to start only if another one is empty?

I have this configuration and I would like the queue with priority 1 not to be launched until the others have finished. I have thought about how to do it with batches, but as the application is, I don't think it makes sense.

:queues:
  - ["tasks", 100]
  - ["products", 80]  
  - ["sellers", 10]
  - ["products", 80]
  - ["seller_types", 1]

The issue of priorities in queues is quite improvable ...

like image 258
rhugo Avatar asked Oct 19 '25 03:10

rhugo


1 Answers

From the documentation:

If you want queues always processed in a specific order, just declare them in order without weights:

:queues:
  - critical
  - default
  - low

This means that any job in the default queue will be processed only when the critical queue is empty.

like image 115
Sergio Tulentsev Avatar answered Oct 21 '25 16:10

Sergio Tulentsev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!