I don't know if this is an option, but if I'm not mistaken, it looks pretty much what you need.
According to sidekiq-sperworker gem docs , you can simply set up a third worker and add it to the superoperator, so make sure that it only works when all the previous ones are complete.
In your example, it will look like this:
Superworker.define(:PrioritySuperworker, :object_class, :object_id, :priority_ids) do batch priority_ids: :priority_id do PriorityMailsWorker :object_class, :object_id, :priority_id end SendConfirmationWorker :object_class, :object_id PerformAnotherOperationInModel :object_class, :object_id end
source share