Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Progress Bar for Background Process in Rails

I have a couple of processes in my Rails application that call to an external web API - and take a long time to finish. I've considered moving them to process in the background.

I would like to be able to show the user the progress of the background process (i.e. a progress bar).

First, are there any good tutorials/learning resources on implementing a progress bar with jQuery in Rails (not related to a file upload process)? I've seen a lot of resources on displaying the graphic - but not a lot of information on how to hook the graphic updating to the actual background process.

Second, as I consider the various gems for background processing, is there one that would work better with a progress bar (i.e. Delayed Jobs, Resque, Sidekiq)?

Thank you

like image 680
2scottish Avatar asked Jan 17 '13 21:01

2scottish


1 Answers

I created a gem 'sk_progress_bar' where I implemented "Progress Bar for Sidekiq Workers in Rails"!

I hope it will be useful for everyone!

You can download gem here:

Rubygems.org

https://rubygems.org/gems/sk_progress_bar

Git

https://github.com/Kondzolko/sk_progress_bar
like image 139
Andriy Kondzolko Avatar answered Nov 27 '22 09:11

Andriy Kondzolko