Navigation Menu

Skip to content

Commit

Permalink
Output "done" trace logs after operations are completely finished
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 23, 2015
1 parent 6b27b72 commit 8082dd9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/droonga/supervisor.rb
Expand Up @@ -53,10 +53,10 @@ def stop_gracefully
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
Expand Down Expand Up @@ -137,8 +137,10 @@ def start
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
Expand Down

0 comments on commit 8082dd9

Please sign in to comment.