[Groonga-commit] droonga/droonga-engine at 8c083ea [master] serf: reduce spread "ensure_serf"

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 5 16:47:35 JST 2015


Kouhei Sutou	2015-01-05 16:47:35 +0900 (Mon, 05 Jan 2015)

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

  Message:
    serf: reduce spread "ensure_serf"

  Modified files:
    lib/droonga/serf.rb

  Modified: lib/droonga/serf.rb (+1 -6)
===================================================================
--- lib/droonga/serf.rb    2015-01-05 16:47:20 +0900 (2ff778c)
+++ lib/droonga/serf.rb    2015-01-05 16:47:35 +0900 (44c15d3)
@@ -66,12 +66,10 @@ module Droonga
     end
 
     def leave
-      ensure_serf
       run_once("leave")
     end
 
     def join(*hosts)
-      ensure_serf
       nodes = hosts.collect do |host|
         "#{host}:#{agent_port}"
       end
@@ -79,7 +77,6 @@ module Droonga
     end
 
     def send_query(query, payload)
-      ensure_serf
       options = ["-format", "json"] + additional_options_from_payload(payload)
       options += [query, JSON.generate(payload)]
       result = run_once("query", *options)
@@ -111,7 +108,6 @@ module Droonga
     end
 
     def current_cluster_state
-      ensure_serf
       nodes = {}
       result = run_once("members", "-format", "json")
       result[:result] = JSON.parse(result[:result])
@@ -131,12 +127,10 @@ module Droonga
     end
 
     def set_tag(name, value)
-      ensure_serf
       run_once("tags", "-set", "#{name}=#{value}")
     end
 
     def delete_tag(name)
-      ensure_serf
       run_once("tags", "-delete", name)
     end
 
@@ -182,6 +176,7 @@ module Droonga
     end
 
     def run_once(command, *options)
+      ensure_serf
       command = Command.new(@serf, command,
                             "-rpc-addr", rpc_address,
                             *options)
-------------- next part --------------
HTML����������������������������...
Download 



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