[Backgroundrb-devel] accessing args in worker
Bill Walton
bill.walton at charter.net
Tue Oct 17 14:44:51 EDT 2006
Thank you, Rob! I really appreciate it.
Best regards,
Bill
----- Original Message -----
From: Rob Biedenharn
To: Bill Walton
Sent: Tuesday, October 17, 2006 1:38 PM
Subject: Re: [Backgroundrb-devel] accessing args in worker
On Oct 17, 2006, at 2:15 PM, Bill Walton wrote:
If, in the controller, I start a worker and pass in an argument like this:
session[:job_key] = MiddleMan.new_worker(:class => :foo_worker,
:args => {:emrec_id => @emrec.id})
How do I access the value in the worker? I can't seem to figure it out ;-p
Thanks!
Bill
def do_work(args)
@emred_id = args[:emrec_id]
# ... do more stuff ...
end
-Rob
Rob Biedenharn http://agileconsultingllc.com
Rob at AgileConsultingLLC.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20061017/843a0bcd/attachment.html
More information about the Backgroundrb-devel
mailing list