[ap4r-devel] [209] trunk/samples/HelloWorld/app/controllers/saf_controller.rb: Changed arguments order for async_to method.

kato-k at rubyforge.org kato-k at rubyforge.org
Tue May 29 06:45:52 EDT 2007


Revision: 209
Author:   kato-k
Date:     2007-05-29 06:45:52 -0400 (Tue, 29 May 2007)

Log Message:
-----------
Changed arguments order for async_to method.

Modified Paths:
--------------
    trunk/samples/HelloWorld/app/controllers/saf_controller.rb

Modified: trunk/samples/HelloWorld/app/controllers/saf_controller.rb
===================================================================
--- trunk/samples/HelloWorld/app/controllers/saf_controller.rb	2007-05-29 10:44:41 UTC (rev 208)
+++ trunk/samples/HelloWorld/app/controllers/saf_controller.rb	2007-05-29 10:45:52 UTC (rev 209)
@@ -53,10 +53,15 @@
   def recovery
     @stored_message = ::Ap4r::StoredMessage.find(params[:id])
 
-    ap4r.async_to(Marshal::load(@stored_message.object),
-                   {},
-                   Marshal::load(@stored_message.headers).merge({ :queue => @stored_message.queue}))
+    headers  = Marshal::load(@stored_message.headers)
+    body = Marshal::load(@stored_message.object)
 
+    url_options = {:controller => 'dummy'} # url is overwritten by :target_url in rm_options
+    async_params = body
+    rm_options = headers.merge({ :queue => @stored_message.queue})
+
+    ap4r.async_to(url_options, async_params, rm_options)
+
     @stored_message.status = 2 # change status value for now, let's destroy if it's unnecessary.
     @stored_message.save
 




More information about the ap4r-devel mailing list