[Groonga-commit] droonga/droonga-engine at 8082dd9 [master] Output "done" trace logs after operations are completely finished

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 23 19:10:24 JST 2015


YUKI Hiroshi	2015-04-23 19:10:24 +0900 (Thu, 23 Apr 2015)

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

  Message:
    Output "done" trace logs after operations are completely finished

  Modified files:
    lib/droonga/supervisor.rb

  Modified: lib/droonga/supervisor.rb (+5 -3)
===================================================================
--- lib/droonga/supervisor.rb    2015-04-23 19:04:58 +0900 (d137579)
+++ lib/droonga/supervisor.rb    2015-04-23 19:10:24 +0900 (ed5b6ce)
@@ -53,10 +53,10 @@ module Droonga
           n_done_worker_runners += 1
           if n_done_worker_runners == n_worker_runners
             yield if block_given?
+            logger.trace("stop_gracefully: done")
           end
         end
       end
-      logger.trace("stop_gracefully: done")
     end
 
     def stop_immediately
@@ -137,8 +137,10 @@ module Droonga
       def stop_gracefully(&block)
         logger.trace("stop_gracefully: start")
         @supervisor.stop_gracefully
-        @stop_gracefully_callback = block
-        logger.trace("stop_gracefully: done")
+        @stop_gracefully_callback = lambda do
+          yield if block_given?
+          logger.trace("stop_gracefully: done")
+        end
       end
 
       def stop_immediately
-------------- next part --------------
HTML����������������������������...
Descargar 



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