diff options
-rw-r--r-- | lib/oxidized/jobs.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/jobs.rb b/lib/oxidized/jobs.rb index 0511b49..3342679 100644 --- a/lib/oxidized/jobs.rb +++ b/lib/oxidized/jobs.rb @@ -1,12 +1,13 @@ module Oxidized class Jobs < Array + AVERAGE_DURATION = 5 # initially presume nodes take 5s to complete attr_accessor :interval, :max, :want def initialize max, interval, nodes @max = max @interval = interval @nodes = nodes - @durations = Array.new(@nodes.size, 5) # guess that nodes take 5s - new_count + @durations = Array.new @nodes.size, AVERAGE_DURATION + duration AVERAGE_DURATION super() end def duration last |