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
commit1165790e7986d920c149afd0898bfc82a34249a5 (patch)
tree22ec90be31ac77469ce6aa68e9215a5738024c57 /lib/custodian/worker.rb
parent26f013750196c5028135216de386496696b02a09 (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