[Groonga-commit] droonga/droonga-engine at f2c8555 [master] Create clients for destination node with separate options

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 23 21:03:10 JST 2015


YUKI Hiroshi	2015-04-23 21:03:10 +0900 (Thu, 23 Apr 2015)

  New Revision: f2c8555586d6eb0fa4e276776d5f488fd3354629
  https://github.com/droonga/droonga-engine/commit/f2c8555586d6eb0fa4e276776d5f488fd3354629

  Message:
    Create clients for destination node with separate options

  Modified files:
    lib/droonga/data_absorber_client.rb

  Modified: lib/droonga/data_absorber_client.rb (+7 -4)
===================================================================
--- lib/droonga/data_absorber_client.rb    2015-04-23 20:53:00 +0900 (1c17569)
+++ lib/droonga/data_absorber_client.rb    2015-04-23 21:03:10 +0900 (05e266a)
@@ -93,7 +93,7 @@ module Droonga
           "progressIntervalSeconds" => @progress_interval_seconds,
         },
       }
-      client = create_destination_client
+      client = Droonga::Client.new(destination_client_options)
       client.subscribe(absorb_message) do |message|
         case message
         when Droonga::Client::Error
@@ -158,15 +158,18 @@ module Droonga
       }.merge(@client_options)
     end
 
+    def synchronous_destination_client_options
+      destination_client_options.merge(:backend => :thread,
+                                       :loop => nil)
+    end
+
     def table_names_in_destination_node
       @table_names_in_destination_node ||= get_table_names_in_destination_node
     end
 
     def get_table_names_in_destination_node
       response = nil
-      client_options = destination_client_options.merge(:backend => :thread,
-                                                        :loop => nil)
-      Droonga::Client.open(client_options) do |client|
+      Droonga::Client.open(synchronous_destination_client_options) do |client|
         response = client.request("dataset" => @source_dataset,
                                   "type"    => "table_list")
       end
-------------- next part --------------
HTML����������������������������...
下載 



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