Navigation Menu

Skip to content

Commit

Permalink
Use more specific option name
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 28, 2014
1 parent bb713ca commit 7061db7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/droonga-engine-catalog-modify
Expand Up @@ -59,9 +59,9 @@ parser.on("--dataset=NAME",
"(#{Droonga::CatalogGenerator::DEFAULT_DATASET})") do |name|
current_dataset = datasets[name] = {}
end
parser.on("--hosts=NAME1,NAME2,...", Array,
parser.on("--replica-hosts=NAME1,NAME2,...", Array,
"Use given hosts as replicas for the current dataset.") do |hosts|
current_dataset[:hosts] = hosts
current_dataset[:replica_hosts] = hosts
end
parser.on("--add-replica-hosts=NAME1,NAME2,...", Array,
"Use given hosts to be added as replicas to the current dataset.") do |hosts|
Expand Down
4 changes: 2 additions & 2 deletions lib/droonga/catalog_generator.rb
Expand Up @@ -78,8 +78,8 @@ def modify(dataset_modifications)

replicas = dataset.replicas

if modification[:hosts]
replicas.hosts = modification[:hosts]
if modification[:replica_hosts]
replicas.hosts = modification[:replica_hosts]
end

if modification[:add_replica_hosts]
Expand Down

0 comments on commit 7061db7

Please sign in to comment.