diff options
author | Steve Kemp <steve@steve.org.uk> | 2016-04-22 21:23:32 +0300 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2016-04-22 21:23:32 +0300 |
commit | fdb5aa7bb41c9a11a2dfdcdb12f00f95f37e2072 (patch) | |
tree | 107279e870e96c884490dbeab9be3bda93429155 /bin/custodian-enqueue | |
parent | 95a1fa2355f2b6352f1929122815504f98f4b4de (diff) |
Updated to fix rubocop warnings.
Diffstat (limited to 'bin/custodian-enqueue')
-rwxr-xr-x | bin/custodian-enqueue | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue index f4f9f0e..602b52a 100755 --- a/bin/custodian-enqueue +++ b/bin/custodian-enqueue @@ -24,12 +24,12 @@ if __FILE__ == $PROGRAM_NAME begin opts = GetoptLong.new( - ['--dump', '-d', GetoptLong::NO_ARGUMENT], - ['--test', GetoptLong::NO_ARGUMENT], - ['--file', '-f', GetoptLong::REQUIRED_ARGUMENT], - ['--help', '-h', GetoptLong::NO_ARGUMENT], + ['--dump', '-d', GetoptLong::NO_ARGUMENT], + ['--test', GetoptLong::NO_ARGUMENT], + ['--file', '-f', GetoptLong::REQUIRED_ARGUMENT], + ['--help', '-h', GetoptLong::NO_ARGUMENT], ['--manual', '-m', GetoptLong::NO_ARGUMENT] - ) + ) opts.each do |opt, arg| case opt when '--dump' then @@ -62,8 +62,8 @@ if __FILE__ == $PROGRAM_NAME # # Connected to the queue. # - queue = Custodian::RedisQueueType.new() - unless queue + queue = Custodian::RedisQueueType.new + unless queue puts "Failed to connect to the #{settings.queue_type} queue" exit 1 end @@ -91,18 +91,18 @@ if __FILE__ == $PROGRAM_NAME failed = false mon.jobs.each do |test| - if ENV['TEST'] + if ENV['TEST'] # nop - elsif ENV['DUMP'] + elsif ENV['DUMP'] puts test else failed = true unless queue.add(test.to_s) end end - if ( failed ) - puts "We failed to add at least one job to the queue." - exit( 1 ) + if failed + puts 'We failed to add at least one job to the queue.' + exit(1) end end |