Closed b0rgbart3 closed 8 years ago
hey @b0rgbart3 - There is nothing like that now. Are you looking for when each job is finished?
Actually I was just looking to get notified when the whole batch is done. Since I'm using it to upload images, it takes quite a while and depends on how many images the user uploads. I thought about just setting up a javascript refresh - but that doesn't seem very Rails-like or very elegant. :-)
There is no notion of a batch notification. @mperham's Sidekiq pro and above has that capability.
You could write your own by starting a counter somewhere with the total number of image jobs to process and then once each job completes, decrement the counter and then have a final job that checks the counter until it's 0 and performs whatever notification code you want.
Any else I can think of would be written manually without any help from Sucker Punch internals.
Thanks Brandon!
Hi Brandon - This is more of a Question rather than an Issue. Is there a way to setup a callback or a method that gets called when all of the jobs are done? I'm using SuckerPunch to upload images in the background and it works great - but it would be great if SuckerPunch could tell my app when it's finished.... (so I can refresh the page and/or notify the user). I'm fairly new to Rails so maybe there's an obvious way to do this.... Thanks!