ruby on rails - Sidekiq push_bulk to batch -


I am trying to use a group of related jobs together to use a sidekick batch for the group. However, the batch sets fire on the entire callback before time, because the jobs method can not bring all jobs fast to radis. In the Sidekick documentation it is said that it is Sidekiq :: Client.push_bulk Can be solved by using the method, but the documentation is unclear when pushing a batch in bulk. Can someone share an example of using push_bulk in the context of a batch? Assuming that you want to process 100 users per user in batch, copy per user ID per page

  b = sidekick :: batch.N.N.b. user user = select (: id) .limit (100) .map (and: id) # users [1, 2] , 3, etc ...] args = users.map {| Uid | [UID]} # Args [[1], [2], [3], etc ...] Sidekick :: Client. Push_bulk ('square' = & gt; your worker, 'args' = & gt; Args) End    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -