Navigation Menu

Skip to content

Commit

Permalink
Read list of live nodes via EngineState.
Browse files Browse the repository at this point in the history
It should not be accessed via Dispatcher itself.
  • Loading branch information
piroor committed Jun 26, 2014
1 parent 2e5313a commit 672e602
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/droonga/dispatcher.rb
Expand Up @@ -46,6 +46,8 @@ def initialize(type, dataset)
end
end

attr_reader :engine_state

def initialize(engine_state, catalog)
@engine_state = engine_state
@forwarder = @engine_state.forwarder
Expand Down
2 changes: 1 addition & 1 deletion lib/droonga/plugins/system.rb
Expand Up @@ -27,7 +27,7 @@ class StatusHandler < Droonga::Handler
def handle(message)
dispatcher = @messenger.dispatcher

live_nodes = dispatcher.live_nodes
live_nodes = dispatcher.engine_state.live_nodes
nodes = {}
dispatcher.all_nodes.collect do |identifier|
nodes[identifier] = {
Expand Down

0 comments on commit 672e602

Please sign in to comment.