diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:09:46 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:09:46 +0000 |
commit | 891b720013f06f092f6be82adad95e5551c696b6 (patch) | |
tree | bffba558147d68d951f403caa2b6396e4faf5f29 /bin | |
parent | 3a96cc957dbd97c6ffeaea42f738e7c35b4acbc7 (diff) |
Do not use parentheses for method calls with no arguments.
This is neater. Flagged by rubocop
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/custodian-dequeue | 6 | ||||
-rwxr-xr-x | bin/custodian-enqueue | 8 | ||||
-rwxr-xr-x | bin/custodian-queue | 6 | ||||
-rwxr-xr-x | bin/multi-ping | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/bin/custodian-dequeue b/bin/custodian-dequeue index c5c5309..a411746 100755 --- a/bin/custodian-dequeue +++ b/bin/custodian-dequeue @@ -65,7 +65,7 @@ if __FILE__ == $PROGRAM_NAME then # # The settings object contains a lot of configuration-data. # - settings = Custodian::Settings.instance() + settings = Custodian::Settings.instance begin opts = GetoptLong.new( @@ -137,7 +137,7 @@ if __FILE__ == $PROGRAM_NAME then # Single step? # if ( ENV['SINGLE'] ) - worker.process_single_job() + worker.process_single_job exit(0) end @@ -145,7 +145,7 @@ if __FILE__ == $PROGRAM_NAME then # Run until we see a failure? # if ( ENV['FAIL'] ) - worker.process_until_fail() + worker.process_until_fail exit(0) end diff --git a/bin/custodian-enqueue b/bin/custodian-enqueue index dec83cb..568c0d6 100755 --- a/bin/custodian-enqueue +++ b/bin/custodian-enqueue @@ -129,10 +129,10 @@ if __FILE__ == $PROGRAM_NAME then # # Connected to the queue - be it redis or beanstalkd # - settings = Custodian::Settings.instance() - queue = Custodian::QueueType.create( settings.queue_type() ) + settings = Custodian::Settings.instance + queue = Custodian::QueueType.create( settings.queue_type ) if ( ! queue ) - puts "Failed to connect to the #{settings.queue_type()} queue" + puts "Failed to connect to the #{settings.queue_type} queue" exit 1 end @@ -140,7 +140,7 @@ if __FILE__ == $PROGRAM_NAME then # # Create the parser object. # - mon = Custodian::Parser.new() + mon = Custodian::Parser.new # diff --git a/bin/custodian-queue b/bin/custodian-queue index 48c6edc..9dec58a 100755 --- a/bin/custodian-queue +++ b/bin/custodian-queue @@ -124,8 +124,8 @@ if __FILE__ == $PROGRAM_NAME then # # Create the queue object. # - settings = Custodian::Settings.instance() - queue = Custodian::QueueType.create( settings.queue_type() ) + settings = Custodian::Settings.instance + queue = Custodian::QueueType.create( settings.queue_type ) # # Alerting on a queue that is too-full? @@ -149,7 +149,7 @@ if __FILE__ == $PROGRAM_NAME then # Showing stats? # if ( $STATS ) - jobs = queue.size?() + jobs = queue.size? puts "There are #{jobs || 0} jobs pending." exit( 0 ) end diff --git a/bin/multi-ping b/bin/multi-ping index 00ae466..9833215 100755 --- a/bin/multi-ping +++ b/bin/multi-ping @@ -121,7 +121,7 @@ helper = Custodian::Util::Ping.new( hostname ) # # Ping the host, via the helper # -if ( helper.run_ping() ) +if ( helper.run_ping ) puts "#{hostname} - #{helper.address} - is alive." exit 0 else |