todd Richmond
2006-Oct-18 05:43 UTC
[Backgroundrb-devel] Please help with 2 (related?) problems
Hi All,
I was able to get the BackgrounDrb plugin installed, and even got the
example
progress bar working. So far so good. But now that I''m trying to do
something
a little more real, I''m getting stuck.
The first problem I''m getting is that the background task seems to be
getting
terminated by Rails. In any case, I am getting the following error as
the first
thing that happens in my background logger:
Connection reset by peer - (DRb::DRbConnError)
What might be the common causes of this error?
The second problem that I''m having, which I suspect may be related, is
that
my view tries to call the get_progress action, but doesn''t get a
response.
In the view file I have:
<%= periodically_call_remote(:url => {:controller =>
''parser'',
:action =>
''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 following error in the log file:
Processing ParserController#get_progress (for 127.0.0.1 at 2006-10-17
23:23:23) [POST]
Session ID: 7425fe7cfe8db2c0211d5046b5b8e166
Parameters: {"action"=>"get_progress",
"controller"=>"parser"}
ActionController::UnknownAction (No action responded to get_progress):
Anyone have any ideas what might be the problem? I''m fairly new to
Ruby, Rails, and BackgrounDrb, so please be gentle. ;)
Thanks a bunch,
Todd Richmond
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061017/ea83e59b/attachment.html
