Navigation Menu

Skip to content

Commit

Permalink
droonga-engine: remove needless serf.running check
Browse files Browse the repository at this point in the history
If we stop serf after we stop catalog observer, serf must be running on
catalog observer notifies changed event.
  • Loading branch information
kou committed Jan 5, 2015
1 parent ebbb5f5 commit 43c6f58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/droonga/command/droonga_engine.rb
Expand Up @@ -390,15 +390,15 @@ def trap_signals

def stop_gracefully
@command_runner.stop
@serf.stop
@catalog_observer.stop
@serf.stop
@service_runner.stop_gracefully
end

def stop_immediately
@command_runner.stop
@serf.stop
@catalog_observer.stop
@serf.stop
@service_runner.stop_immediately
end

Expand Down Expand Up @@ -437,7 +437,7 @@ def run_catalog_observer
catalog_observer = FileObserver.new(@loop, Path.catalog)
catalog_observer.on_change = lambda do
restart_graceful
@serf.update_cluster_id if @serf and @serf.running?
@serf.update_cluster_id
end
catalog_observer.start
catalog_observer
Expand Down

0 comments on commit 43c6f58

Please sign in to comment.