railsbump / app

Check which gems are compatible with which Rails version!
https://railsbump.org
MIT License
166 stars 23 forks source link

Bypassing Heroku's 30 Second processing rule. #69

Closed Okomikeruko closed 2 years ago

Okomikeruko commented 2 years ago

I had the same problem with one of my apps on Heroku. I had a large process that took more than 30 seconds some times. Specifically it was compressing a catalog of images into a .zip file for customers. Small collections of 10 images were no problem. Once we hit 37 or more images the timeout invariably hit.

That's when I discovered Sidekiq and Jobs/Workers. I could offset the task to Sidekiq which would work on it until it was done.

But it wasn't until I also learned about ActionCable that was able to broadcast back details from the Sidekiq task into a Bootstrap progress bar then call a redirect on completion.

manuelmeurer commented 2 years ago

Thanks for your comment, @Okomikeruko! Yeah, something like ActionCable would be a possibility. Unfortunately I don't have any time to work on this at the moment, but if you want to take a shot at it, I'd be happy to review a PR. 😄