Implement the 'reload-updated' command. #24

Merged
merged 2 commits into from Mar 26, 2012
Jump to file or symbol
Failed to load files and symbols.
+11 −2
Split
View
@@ -238,7 +238,11 @@ def down(id, depth = 0)
class ReloadCommand < Command
def run
if global_options.force || ask
- manager.reload_config
+ if command_options.fast
+ manager.reload_updated_forwardings
+ else
+ manager.reload_config
+ end
else
STDERR.puts "aborted"
end
View
@@ -277,10 +277,15 @@ def add_template_opts(subcommand_options, opts)
opts.banner = "Usage: #{zero} info SHARD_ID [MORE SHARD_IDS...]"
separators(opts, DOC_STRINGS["info"])
end,
+
'reload' => OptionParser.new do |opts|
- opts.banner = "Usage: #{zero} reload"
+ opts.banner = "Usage: #{zero} reload [--fast]"
separators(opts, DOC_STRINGS["reload"])
+ opts.on("--fast", "Reload only the entries that have been updated since the last reload.") do
+ subcommand_options.fast = true
+ end
end,
+
'drill' => OptionParser.new do |opts|
opts.banner = "Usage: #{zero} drill SIGNATURE"
separators(opts, DOC_STRINGS["drill"])