You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a sidekiq queue in which tasks are performed by different users. One user, by his actions, at a time can generate 15-20 tasks and fill the entire queue and the sidekiq worker.
I need to check the task for the uniqueness of the parameters and give the opportunity to perform simultaneously 3 tasks from one user.
Is it possible to save them as something in Enqueued, as does sidekiq-limit_fetch, only based on the arguments of the task?
The text was updated successfully, but these errors were encountered:
What you are looking for is something like a round robin processor of the queue which balances the jobs between users.
I have seen such work done in the past but it is out of scope for uniqueness. Uniqueness implies only one with the same arguments and per job. You are looking for either creating a unique queue per user or something like that to make it work the way you want.
No no no. I solved the problem with 3 tasks per person. Sidekiq::LoadStatMetrical.perform_async(user.id, params, user.metricals.count % 3)
I have 15-20 tasks on the user. My hope is that I overlooked something in the documentation. And I can keep unique tasks unique_args: ->(args) { [args[0], args[-1]] } in the Busy queue. And the rest will wait for their start in Enqueued.
I have a sidekiq queue in which tasks are performed by different users. One user, by his actions, at a time can generate 15-20 tasks and fill the entire queue and the sidekiq worker.
I need to check the task for the uniqueness of the parameters and give the opportunity to perform simultaneously 3 tasks from one user.
Is it possible to save them as something in Enqueued, as does sidekiq-limit_fetch, only based on the arguments of the task?
The text was updated successfully, but these errors were encountered: