I''m working on upgrading to the latest backgroundrb (from svn, not the bleeding edge from github), and have been able to work through each problem I''ve encountered until this. I''ve got a set of workers running, and one ''master'' worker that assigns them tasks like this: MiddleMan.ask_work(:worker=>worker, :job_key=>job_key, :worker_method=>:work_wrapper) (worker and job_key are references to already-existing workers) In the latest version this doesn''t work, I get this at the top of my backtrace: undefined method `ask_work'' for #<BackgrounDRb::ClusterConnection:0x20a2f4c> So now that the ask_work method is gone, what''s the right way for me to do this? I''ve looked through the documentation on the website and haven''t seen anything that deals with this usage. -- // jack // http://www.nuthole.com
Hi Jack, New method is simply: MiddleMan.worker(:foo_worker,"worker_key").async_work_wrapper() and for synchronous tasks MiddleMan.worker(:foo_worker,"worker_key").work_wrapper() More details you can find at: http://rubyforge.org/pipermail/backgroundrb-devel/2008-July/001880.html On Fri, 2008-09-19 at 14:33 +0200, Jack Nutting wrote:> I''m working on upgrading to the latest backgroundrb (from svn, not the > bleeding edge from github), and have been able to work through each > problem I''ve encountered until this. > > I''ve got a set of workers running, and one ''master'' worker that > assigns them tasks like this: > > MiddleMan.ask_work(:worker=>worker, :job_key=>job_key, > :worker_method=>:work_wrapper) > > (worker and job_key are references to already-existing workers) > > In the latest version this doesn''t work, I get this at the top of my backtrace: > > undefined method `ask_work'' for #<BackgrounDRb::ClusterConnection:0x20a2f4c> > > So now that the ask_work method is gone, what''s the right way for me > to do this? I''ve looked through the documentation on the website and > haven''t seen anything that deals with this usage. >
On Fri, Sep 19, 2008 at 3:11 PM, hemant kumar <gethemant at gmail.com> wrote:> Hi Jack, > > New method is simply: > > MiddleMan.worker(:foo_worker,"worker_key").async_work_wrapper() > > and for synchronous tasks > > MiddleMan.worker(:foo_worker,"worker_key").work_wrapper() > > More details you can find at: > > http://rubyforge.org/pipermail/backgroundrb-devel/2008-July/001880.htmlThanks, that seems to do the trick! I must have missed your announcement about 1.0.4 and its new features and change back in July, because this week I''ve been "discovering" some of them one at a time ;) -- // jack // http://www.nuthole.com