summaryrefslogtreecommitdiff
path: root/lib/custodian
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2013-05-14 14:13:23 +0100
committerSteve Kemp <steve@steve.org.uk>2013-05-14 14:13:23 +0100
commit2c5ca798e2f7ccdd56b7f37a8834b655686ebdba (patch)
tree209616f124ec471ea893c640ab8c1082f6a7dc98 /lib/custodian
parentb1ec8987fe00481b9702d05b7dd7114835f9fda8 (diff)
Ensure repeat_count and sleep values are integers.
Diffstat (limited to 'lib/custodian')
-rw-r--r--lib/custodian/settings.rb4
-rw-r--r--lib/custodian/worker.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/custodian/settings.rb b/lib/custodian/settings.rb
index 34a54a6..310de02 100644
--- a/lib/custodian/settings.rb
+++ b/lib/custodian/settings.rb
@@ -97,7 +97,7 @@ module Custodian
def retries
_load() unless( _loaded? )
- @settings['retries' ] || 5
+ @settings['retries' ].to_i || 5
end
@@ -107,7 +107,7 @@ module Custodian
def retry_delay
_load() unless( _loaded? )
- @settings['retry_delay'] || 0
+ @settings['retry_delay'].to_i || 0
end
diff --git a/lib/custodian/worker.rb b/lib/custodian/worker.rb
index 432b3d4..90e8e99 100644
--- a/lib/custodian/worker.rb
+++ b/lib/custodian/worker.rb
@@ -198,7 +198,7 @@ module Custodian
# We delay before re-testing.
#
if ( @retry_delay > 0 )
- puts "Sleeping for #{@retry_delay} seconds to allow cooldown"
+ puts "Sleeping for #{@retry_delay} seconds to allow cool-down"
sleep( @retry_delay )
end
end