[Groonga-commit] droonga/droonga-engine at 48f7819 [master] Extract as a method

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jul 20 23:59:49 JST 2014


Kouhei Sutou	2014-07-20 23:59:49 +0900 (Sun, 20 Jul 2014)

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

  Message:
    Extract as a method

  Modified files:
    lib/droonga/command/droonga_engine.rb

  Modified: lib/droonga/command/droonga_engine.rb (+10 -7)
===================================================================
--- lib/droonga/command/droonga_engine.rb    2014-07-20 23:45:08 +0900 (619969f)
+++ lib/droonga/command/droonga_engine.rb    2014-07-20 23:59:49 +0900 (f9fae67)
@@ -250,13 +250,7 @@ module Droonga
           @serf = run_serf
           @serf_status_observer = run_serf_status_observer
           @service_runner = run_service
-          if****@confi*****_notify_fd
-            @service_runner.on_ready = lambda do
-              output = IO.new(@configuration.ready_notify_fd)
-              output.puts("ready")
-              output.close
-            end
-          end
+          setup_initial_on_ready
           @catalog_observer = run_catalog_observer
           @loop_breaker = Coolio::AsyncWatcher.new
           @loop.attach(@loop_breaker)
@@ -269,6 +263,15 @@ module Droonga
         end
 
         private
+        def setup_initial_on_ready
+          return if****@confi*****_notify_fd.nil?
+          @service_runner.on_ready = lambda do
+            output = IO.new(@configuration.ready_notify_fd)
+            output.puts("ready")
+            output.close
+          end
+        end
+
         def trap_signals
           trap(:TERM) do
             stop_gracefully
-------------- next part --------------
HTML����������������������������...
Download 



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