Batch status throwing NoSuchBatch error after it's completed

9 views
Skip to first unread message

John C.

unread,
Oct 7, 2015, 3:03:16 PM10/7/15
to Sidekiq
Hi Sidekiq group,

Maybe this is by design, but Sidekiq::Batch::Status.new(bid) will throw a NoSuchBatch error after the job has completed.

Which is confusing since status.complete? is an attribute of the status object.

Is there no way to get a batch status after it has completed?

Thanks,
John


Mike Perham

unread,
Oct 7, 2015, 3:06:22 PM10/7/15
to sid...@googlegroups.com
Hi John, batches are removed from Redis once they are successful, not complete.  If you try to get the status for a successful batch, you will get a NoSuchBatch error since it has been deleted.

Mike

--
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/893a8992-a234-4e63-a502-858d50b6704a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



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

John C.

unread,
Oct 7, 2015, 3:28:59 PM10/7/15
to Sidekiq
Ok. So I see why the callback is important.

batch.on(:success, MyCallback, :to => user.email)

Thanks,
John
Reply all
Reply to author
Forward
0 new messages