Enqueuing Sidekiq Batches using Redis

49 views
Skip to first unread message

Abhi Rao

unread,
Apr 23, 2015, 11:10:21 AM4/23/15
to sid...@googlegroups.com
I'm enqueuing some jobs by dropping them directly into redis. I'm following the "How do I push a job to Sidekiq without Rails?" section in https://github.com/mperham/sidekiq/wiki/FAQ

We're running sidekiq pro and I'm wondering if it's possible to set these jobs up in batches to make it easier to track progress and perhaps notify on completion. I'm assuming I would have to emulate the work done by Batch#jobs and the batch client middleware. Is this a viable option and if so is it documented?

Mike Perham

unread,
Apr 23, 2015, 11:23:24 AM4/23/15
to sid...@googlegroups.com
Unfortunately there's no documented way to do this.  Your assumptions are entirely correct, you can build the batch data yourself and inject the jobs into it with Redis directly.  The jobs need a 'bid' attribute and the batch data needs to be created also but the data model is all subject to change in major version bumps: the batch data model in 2.x is significantly different from 1.x.

Mike

On Thu, Apr 23, 2015 at 11:10 AM, Abhi Rao <abh...@gmail.com> wrote:
I'm enqueuing some jobs by dropping them directly into redis. I'm following the "How do I push a job to Sidekiq without Rails?" section in https://github.com/mperham/sidekiq/wiki/FAQ

We're running sidekiq pro and I'm wondering if it's possible to set these jobs up in batches to make it easier to track progress and perhaps notify on completion. I'm assuming I would have to emulate the work done by Batch#jobs and the batch client middleware. Is this a viable option and if so is it documented?

--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To post to this group, send email to sid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/4ff8ee4c-3bbc-45c2-94bc-2f9f3c547c85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Mike Perham – Contributed Systems
Smart, effective open source infrastructure for your apps.

Abhi Rao

unread,
Apr 23, 2015, 1:46:38 PM4/23/15
to sid...@googlegroups.com
Thanks for confirming. I'm not sure it's worth it in my use case - I mostly care that all jobs are done. But if I do give it a shot I will reply with the steps I used.
Reply all
Reply to author
Forward
0 new messages