diff options
Diffstat (limited to 'lib/oxidized/jobs.rb')
-rw-r--r-- | lib/oxidized/jobs.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/oxidized/jobs.rb b/lib/oxidized/jobs.rb index 2c656f6..c566778 100644 --- a/lib/oxidized/jobs.rb +++ b/lib/oxidized/jobs.rb @@ -6,7 +6,9 @@ module Oxidized def initialize max, interval, nodes @max = max - @interval = interval + # Set interval to 1 if interval is 0 (=disabled) so we don't break + # the 'ceil' function + @interval = interval == 0 ? 1 : interval @nodes = nodes @last = Time.now.utc @durations = Array.new @nodes.size, AVERAGE_DURATION |