On Fri, Feb 15, 2008 at 4:15 AM, Richard Everhart <[EMAIL PROTECTED]> wrote: > Thanks, Hemant. I made the change related to the job key and I'm not > getting a value back from new_worker. However, the 'not able to > connect error' is on going. > > My zipped up app is attached. Thanks for helping me out. >
First Problems with your controller code: You have line: session[:job_key] = MiddleMan.new_worker(:class => :fibonacci_worker, :job_key => 'the_key', :data => params[:input]) Please note that, it should be :worker not :class, so please change the line to: session[:job_key] = MiddleMan.new_worker(:worker => :fibonacci_worker, :job_key => 'the_key', :data => params[:input]) Now, You have line: MiddleMan.send_request(:worker => :fibonacci_worker, :worker_method => :do_work, :data => params[:input]) Again, as i said earlier, when you are creating a worker with a "job_key" you *must* always access that instance of worker with the same job key and hence it should be: MiddleMan.send_request(:worker => :fibonacci_worker, :worker_method => :do_work, :data => params[:input], :job_key => session[:job_key]) Your worker code is perfectly fine and should work as it. Also, update your plugin from trunk and remove "backgroundrb" script present in script directory and restart the server and try now. It will work. -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org _______________________________________________ Backgroundrb-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/backgroundrb-devel
