summaryrefslogtreecommitdiff
path: root/lib/custodian/worker.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:09:46 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:09:46 +0000
commitedf0e675123e4869e2739d1bab0ed57b3b9f664c (patch)
treec0771fecb0734fb342cf16e352f19fd3ead9a112 /lib/custodian/worker.rb
parent22b40326730fb7a4a8e2f5cb8d877f6a84494d02 (diff)
Do not use parentheses for method calls with no arguments.
This is neater. Flagged by rubocop
Diffstat (limited to 'lib/custodian/worker.rb')
-rw-r--r--lib/custodian/worker.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb
index b411c00..fd1abce 100644
--- a/lib/custodian/worker.rb
+++ b/lib/custodian/worker.rb
@@ -73,16 +73,16 @@ module Custodian
@settings = settings
# Connect to the queue
- @queue = QueueType.create( @settings.queue_type() )
+ @queue = QueueType.create( @settings.queue_type )
# Get the alerter-type(s) to instantiate
@alerter = @settings.alerter
# How many times to repeat a failing test
- @retry_count=@settings.retries()
+ @retry_count=@settings.retries
# Should we sleep between repeated tests?
- @retry_delay = @settings.retry_delay()
+ @retry_delay = @settings.retry_delay
end
@@ -105,7 +105,7 @@ module Custodian
def run!
while( true )
log_message( "Waiting for job.." )
- process_single_job()
+ process_single_job
end
end
@@ -170,7 +170,7 @@ module Custodian
# Run the test - inverting the result if we should
#
result = test.run_test
- result = ! result if ( test.inverted() )
+ result = ! result if ( test.inverted )
if ( result )
log_message( "Test succeeed - clearing alert" )
@@ -223,7 +223,7 @@ module Custodian
#
# Raise the alert, passing the error message.
#
- log_message( "Test failed - alerting with #{test.error()}" )
+ log_message( "Test failed - alerting with #{test.error}" )
do_raise( test )
end
@@ -252,7 +252,7 @@ module Custodian
# give the alerter a reference to the settings object.
alert.set_settings( @settings )
- alert.raise()
+ alert.raise
end
end
@@ -272,7 +272,7 @@ module Custodian
# give the alerter a reference to the settings object.
alert.set_settings( @settings )
- alert.clear()
+ alert.clear
end
end
@@ -300,7 +300,7 @@ module Custodian
# Process jobs until we see a failure, then stop.
#
def process_until_fail
- while( process_single_job() )
+ while( process_single_job )
# nop
end
end