Navigation Menu

Skip to content

Commit

Permalink
Remove codes to store live nodes from Dispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 26, 2014
1 parent 5536a78 commit 78e6a58
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/droonga/dispatcher.rb
Expand Up @@ -46,14 +46,11 @@ def initialize(type, dataset)
end
end

attr_accessor :live_nodes

def initialize(engine_state, catalog)
@engine_state = engine_state
@forwarder = @engine_state.forwarder
@replier = @engine_state.replier
@catalog = catalog
@live_nodes = all_nodes
@adapter_runners = create_adapter_runners
@farm = Farm.new(@engine_state.name, @catalog, @engine_state.loop,
:dispatcher => self,
Expand Down Expand Up @@ -174,7 +171,7 @@ def dispatch_steps(steps)
steps.each do |step|
dataset = @catalog.dataset(step["dataset"])
if dataset
routes = dataset.get_routes(step, @live_nodes)
routes = dataset.get_routes(step, @state.live_nodes)
step["routes"] = routes
else
step["routes"] ||= [id]
Expand Down Expand Up @@ -211,10 +208,6 @@ def local?(route)
@engine_state.local_route?(route)
end

def all_nodes
@catalog.all_nodes
end

private
def farm_path(route)
@engine_state.farm_path(route)
Expand Down

0 comments on commit 78e6a58

Please sign in to comment.