Displaying 1 result from an estimated 1 matches for "prince_xml_work".
Did you mean:
prince_xml_worker
2008 Sep 08
2
Problems with async worker request
...worker
and calls the ''build_pdf'' method asynchronously.
def make_pdf(template_path, worker_key)
with_empty_asset_id do
html_string = render_to_string(:template => template_path, :layout =>
''pdf'')
key = MiddleMan.new_worker(:worker => :prince_xml_worker, :worker_key
=> worker_key)
MiddleMan.worker(:prince_xml_worker, key).async_build_pdf(:arg =>
html_string)
end
end
Then there''s another method which polls the worker like so.
def ask_worker_status(worker_key)
MiddleMan.worker(:prince_xml_worker, worker_key).ask_...