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 -- Posted via http://www.ruby-forum.com/.
http://rails.techno-weenie.net/question/2005/12/24/how_do_you_display_the_progress_of_a_long_running_action -Jonathan. On 6/25/06, Roland Mai <roland.mai@gmail.com> wrote:> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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 -- Posted via http://www.ruby-forum.com/.
You need to use a multithreaded web server, not Webrick. Lighttpd should do. -Jonathan On 6/26/06, Roland Mai <roland.mai@gmail.com> wrote:> 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. >