[Groonga-commit] droonga/fluent-plugin-droonga at 6b9198f [master] Prepare to distribute multiple messages

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Jan 24 11:54:53 JST 2014


YUKI Hiroshi	2014-01-24 11:54:53 +0900 (Fri, 24 Jan 2014)

  New Revision: 6b9198fdb7621c9926707ddddec6fb48410def23
  https://github.com/droonga/fluent-plugin-droonga/commit/6b9198fdb7621c9926707ddddec6fb48410def23

  Message:
    Prepare to distribute multiple messages

  Modified files:
    lib/droonga/distributor_plugin.rb

  Modified: lib/droonga/distributor_plugin.rb (+8 -6)
===================================================================
--- lib/droonga/distributor_plugin.rb    2014-01-24 11:53:13 +0900 (cb19d55)
+++ lib/droonga/distributor_plugin.rb    2014-01-24 11:54:53 +0900 (8b35b64)
@@ -31,7 +31,7 @@ module Droonga
     end
 
     def scatter_all(message, key)
-      distribute_message = [{
+      distribute_message = {
         "command"=> message["type"],
         "dataset"=> message["dataset"],
         "body"=> message["body"],
@@ -39,20 +39,22 @@ module Droonga
         "type"=> "scatter",
         "replica"=> "all",
         "post"=> true
-      }]
-      distribute(distribute_message)
+      }
+      messages = [distribute_message]
+      distribute(messages)
     end
 
     def broadcast_all(message)
-      distribute_message = [{
+      distribute_message = {
         "command"=> message["type"],
         "dataset"=> message["dataset"],
         "body"=> message["body"],
         "type"=> "broadcast",
         "replica"=> "all",
         "post"=> true
-      }]
-      distribute(distribute_message)
+      }
+      messages = [distribute_message]
+      distribute(messages)
     end
 
     private
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index