Answer the question
In order to leave comments, you need to log in
How to make multiple unique sidekiq tasks work inside the same queue?
I have a sidekiq queue that runs tasks from different users. One user, by his actions, can generate 15-20 tasks at a time and fill the entire queue and sidekiq worker.
I need to check the task for the uniqueness of the parameters and give the opportunity to perform 3 tasks simultaneously from one user.
I am aware of the sidekiq-unique-jobs gem . Unfortunately, I couldn't find what I needed in it. while_executing puts all tasks in the execution queue and executes them sequentially, but the Busy queue is busy. And the rest cut their entry into the sidekiq queue.
Is it possible to somehow save them in Enqueued, as sidekiq-limit_fetch does , only based on the task arguments?
Answer the question
In order to leave comments, you need to log in
I think that you should check parameters from your side before creating a worker.
PS It is possible to take / store temporary data in redis-e for comparison "whether such a worker was launched or not".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question