Function/Method Execution Progress Bar

Hello,

I want to create a progress bar for the exececution of a particular
function.

I found a solution at http://brainspl.at/articles/tag/background but one
need to create a separate server that communicates the progress of a
job.

Is there anyways to change a global variable or so and have the user see
the execution stage of the function?

I tried playing with Thread but no success because for the page to be
loaded the thread must finish.

Thanks for your time,

Roland

http://rails.techno-weenie.net/question/2005/12/24/how_do_you_display_the_progress_of_a_long_running_action

-Jonathan.

Thanks Jonathan,

brainspl.at is blog of “ezmobius” who proposed the solution with the drb
server.

Actually, I did implement before reading this blog the solution by
“madrobby” but that does not work because Rails does not respond the
ajax call while processing a function.

Thanks for the answer,

Roland

Thanks a bunch Jonathan. It worked fine. It’s a great resource to have
such functionality.

Roland

You need to use a multithreaded web server, not Webrick. Lighttpd should
do.

-Jonathan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs