summaryrefslogtreecommitdiff
path: root/lib/custodian/worker.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 14:43:10 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 14:43:10 +0000
commit69acb34d89e05637f04531f4ba8903f1dd887383 (patch)
tree023a3777576237d3b89b7554c00ee2ae1142b0a9 /lib/custodian/worker.rb
parentff910ae9491d81085e25d289f61cec72e96e57ef (diff)
Removed trailing whitespace from the code
Diffstat (limited to 'lib/custodian/worker.rb')
-rw-r--r--lib/custodian/worker.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb
index e9a7532..a8118da 100644
--- a/lib/custodian/worker.rb
+++ b/lib/custodian/worker.rb
@@ -93,7 +93,7 @@ module Custodian
# Show a message on STDOUT if "--verbose" was specified.
#
def log_message(msg)
- puts msg if ENV['VERBOSE']
+ puts msg if ENV['VERBOSE']
end
@@ -162,7 +162,7 @@ module Custodian
#
# We exit here if we receive a single success.
#
- while (count < (@retry_count + 1)) && (result == false)
+ while (count < (@retry_count + 1)) && (result == false)
log_message("Running test - [#{count}/#{@retry_count}]")
@@ -170,9 +170,9 @@ 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
+ if result
log_message('Test succeeed - clearing alert')
do_clear(test)
end
@@ -186,7 +186,7 @@ module Custodian
# The intention here is that if the test passes then there will
# be no delay. If the test fails then we'll sleep.
#
- if (result == false) && (@retry_delay > 0) && (count < @retry_count)
+ if (result == false) && (@retry_delay > 0) && (count < @retry_count)
log_message("Sleeping for #{@retry_delay} seconds to allow cool-down")
sleep(@retry_delay)
end
@@ -218,7 +218,7 @@ module Custodian
#
# If we didn't succeed on any of the attempts raise the alert.
#
- if !result
+ if !result
#
# Raise the alert, passing the error message.
@@ -291,7 +291,7 @@ module Custodian
# give the alerter a reference to the settings object.
alert.set_settings(@settings)
- alert.duration(duration) if alert.respond_to? 'duration'
+ alert.duration(duration) if alert.respond_to? 'duration'
end
end