Displaying 7 results from an estimated 7 matches for "progressperc".
2007 Sep 24
3
Trouble using backgroundrb
...session[:job_key] = MiddleMan.new_worker(:class => "passwd:get_passwds_worker", :args => "")
end
def get_progress
if request.xhr?
progress_percent = MiddleMan.get_worker(session[:job_key]).progress
render :update do |page|
page.call(''progressPercent'', ''progressbar'', progress_percent)
page.redirect_to( :action => ''done'') if progress_percent >= 100
end
else
redirect_to :action => ''index''
end
end
def done
render :text => "De dat...
2006 Oct 04
0
do_work and long running rails tasks?
...@percent = 100
self.kill
end
-- snip ---
--- controller.rb --
def syslog_progress
if request.xhr?
worker = MiddleMan.get_worker(session[:host_info])
if worker
progress_percent = worker.progress
render :update do |page|
page.call(''progressPercent'', ''progressbar'', progress_percent)
@rows = Sysloglog.find( worker.rows) rescue []
page.replace_html ''syslog_rows'', :partial => "analysis/
syslog", :object => @rows
if progress_percent >= 100...
2006 Oct 18
0
Please help with 2 (related?) problems
...;get_progress''}, :frequency => 1) %>
And in the parser controller, I have (basically verbatim from the
example):
def get_progress
if request.xhr?
progress_percent =
MiddleMan.get_worker(session[:job_key]).progress
render :update do |page|
page.call(''progressPercent'', ''progressbar'', progress_percent)
page.redirect_to( :action => ''done'') if progress_percent >=
100
end
else
redirect_to :action => ''index''
end
end
When I run the controller, I get the followi...
2006 Jul 24
0
Mongrel + BackgrounDRb + File Column = Upload Progress Bar?
...call_remote(:url => {:action => ''get_progress''}, :frequency =>
1) %> which calls the below method:
def get_progress
if request.xhr?
progress_percent = MiddleMan.get_worker(session[:job_key]).progress
render :update do |page|
page.call(''progressPercent'', ''progressbar'', progress_percent)
page.redirect_to ( :action => ''done'') if progress_percent >= 100
end
else
redirect_to :action => ''index''
end
end
def done
MiddleMan.delete_worker(sess...
2006 Oct 17
6
Session access interfers with other model access
Sorry to be such a bother but I''m not getting this.
I have two models: Emrec and Session (I''m using AR for session mgmt.) In my
worker I can access the Emrec model and delete a record, AS LONG AS I don''t
try to access the Session model. With the Session model access commented
out as below, the Emrec record gets deleted. If I uncomment those lines,
the Emrec
2006 Jul 24
4
Mongrel + BackgrounDRb + File Column = Upload Progress Bar?
...call_remote(:url => {:action => ''get_progress''}, :frequency =>
1) %> which calls the below method:
def get_progress
if request.xhr?
progress_percent = MiddleMan.get_worker(session[:job_key]).progress
render :update do |page|
page.call(''progressPercent'', ''progressbar'', progress_percent)
page.redirect_to( :action => ''done'') if progress_percent >= 100
end
else
redirect_to :action => ''index''
end
end
def done
MiddleMan.delete_worker(sessi...
2006 Aug 16
7
Forward of moderated message
...baz =>
> ''hello!'', :qux => ''another arg!''})
> end
>
> def task_progress
> if request.xhr?
> progress_percent = MiddleMan.get_worker(session
> [:job_key]).progress
> render :update do |page|
> page.call(''progressPercent'', ''progressbar'', progress_percent)
> page.redirect_to( :action => ''done'') if progress_percent >=
> 100
> end
> else
> redirect_to :action => ''index''
> end
> end
>
> def result...