Displaying 1 result from an estimated 1 matches for "p_body".
Did you mean:
x_body
2008 Apr 09
1
Need help in passing parameters to a background job method
...passing multiple parameters to email_admin?
Thanks
==============================
# Worker Code
class PostalWorker < BackgrounDRb::MetaWorker
set_worker_name :postal_worker
def create
# this method is called, when worker is loaded for the first time
end
def email_admin(p_subject,p_body)
Emailer.deliver_send_info(p_subject,p_body,Time.now)
end
end
==============================
# Rails controller code
class FooController < ApplicationController
def bar
worker = MiddleMan.worker(:postal_worker)
result = worker.email_admin(''Some subject'','...