gpt4 book ai didi

ruby-on-rails - sidekiq队列的优先级

转载 作者:行者123 更新时间:2023-12-04 12:41:06 25 4
gpt4 key购买 nike

对于 sidekiq 是否有任何配置让一个队列只有在另一个队列为空时才启动?

我有这个配置,我希望优先级为 1 的队列在其他队列完成之前不启动。我想过如何用批处理来做,但作为应用程序,我认为这没有意义。

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

队列中的优先级问题是可以改进的...

最佳答案

来自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.

关于ruby-on-rails - sidekiq队列的优先级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59092480/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com