On Fri, Mar 13, 2009 at 11:57 AM, Justin Wood <[email protected]> wrote: > Hi, Samer > > Thanks for the quick reply. I changed things a bit and ran this > >>> >>> MiddleMan.new_worker(:worker=>:notification_worker,:worker_key=>'testkey',:data=>"data >>> arguement") > => "testkey" >>> >>> MiddleMan.worker(:notification_worker,'testkey').enq_send_warranty_notice(:job_key=>Time.now.to_s,:arg >>> => "asdf",:scheduled_at => Time.now + 3.second) > => true > > ... but the arg is still not being passed. > > My understanding of new_worker is it explictly creates a worker for you that > you can refer to by the key, so > > If I do this: > > MiddleMan.worker(:notification_worker,'testkey') > > I'm getting the worker I created above but when I call this: > > MiddleMan.worker(:notification_worker) > > I'm getting the default worker that was created at startup. > > Regardless of how the worker is created the "arg" parameter is still not > being passed when it gets invoked to do enqued work. Going through the > code ... I can't figure out how it gets invoked. >
Well whatever you pass to enq_xxx method gets marshalled to database and gets unmarshalled from table when the task is scheduled inside worker. Can you paste your worker code? _______________________________________________ Backgroundrb-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/backgroundrb-devel
