Navigation Menu

Skip to content

Commit

Permalink
Save last processed message timestamp later as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 23, 2015
1 parent 991f90b commit 909009f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/droonga/engine.rb
Expand Up @@ -76,9 +76,9 @@ def stop_gracefully
@cluster.shutdown
on_finish = lambda do
logger.trace("stop_gracefully/on_finish: start")
save_last_processed_message_timestamp
@dispatcher.stop_gracefully do
@state.shutdown
save_last_processed_message_timestamp
yield
end
logger.trace("stop_gracefully/on_finish: done")
Expand All @@ -96,10 +96,10 @@ def stop_gracefully
# It may be called after stop_gracefully.
def stop_immediately
logger.trace("stop_immediately: start")
save_last_processed_message_timestamp
@dispatcher.stop_immediately
@cluster.shutdown
@state.shutdown
save_last_processed_message_timestamp
logger.trace("stop_immediately: done")
end

Expand Down

0 comments on commit 909009f

Please sign in to comment.