[Backgroundrb-devel] send objet between 2 workers

Frédéric Logier fredix at gmail.com
Thu Jun 21 09:52:31 EDT 2007

2007/6/21, Frédéric Logier :
> Second is I'm trying to call a worker from another to send it an object,
> is it possible ?
> job =MiddleMan.worker(:second_worker) doesn't work in my first worker.

I see this bug report :
but I don't understand this : "I can pass the actual worker reference into
the other workers in args and that works"

I tried this but it doesn't work better, second worker crash :

s_worker = MiddleMan.new_worker(:class => :FIRSTWorker,
                                    :job_key => :first_worker,
                                    :args => "")

 MiddleMan.new_worker(:class => :SECONDWorker,
                                   :job_key => :second_worker,
                                    :args => {:sms_job_key => s_worker})

def do_work(args)
   @sms_worker = args[:sms_job_key]

def test
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070621/767d6bc5/attachment.html 

More information about the Backgroundrb-devel mailing list