[Groonga-commit] droonga/droonga-engine at 9f7ba31 [master] dispatcher: support graceful stop

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Sep 6 00:10:59 JST 2014


Kouhei Sutou	2014-09-06 00:10:59 +0900 (Sat, 06 Sep 2014)

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

  Message:
    dispatcher: support graceful stop

  Modified files:
    lib/droonga/dispatcher.rb

  Modified: lib/droonga/dispatcher.rb (+12 -0)
===================================================================
--- lib/droonga/dispatcher.rb    2014-09-06 00:10:44 +0900 (0203435)
+++ lib/droonga/dispatcher.rb    2014-09-06 00:10:59 +0900 (6c0eaf0)
@@ -69,6 +69,18 @@ module Droonga
       @farm.start
     end
 
+    def stop_gracefully(&on_stop)
+      logger.trace("stop_gracefully: start")
+      @collector_runners.each_value do |collector_runner|
+        collector_runner.shutdown
+      end
+      @adapter_runners.each_value do |adapter_runner|
+        adapter_runner.shutdown
+      end
+      @farm.stop_gracefully(&on_stop)
+      logger.trace("stop_gracefully: done")
+    end
+
     def shutdown
       logger.trace("shutdown: start")
       @collector_runners.each_value do |collector_runner|
-------------- next part --------------
HTML����������������������������...
Descargar 



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