summaryrefslogtreecommitdiff
path: root/lib/oxidized/node
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/node')
-rw-r--r--lib/oxidized/node/stats.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oxidized/node/stats.rb b/lib/oxidized/node/stats.rb
index 0778d6d..fbc2cf7 100644
--- a/lib/oxidized/node/stats.rb
+++ b/lib/oxidized/node/stats.rb
@@ -1,6 +1,7 @@
module Oxidized
class Node
class Stats
+ attr_accessor :mtime
MAX_STAT = 10
# @param [Job] job job whose information add to stats
@@ -35,9 +36,14 @@ module Oxidized
@stats[:counter].reduce(0) { |m, h| h[0] == :success ? m : m + h[1] }
end
+ def update_mtime
+ @mtime = Time.now.utc
+ end
+
private
def initialize
+ @mtime = "unknown"
@stats = {}
@stats[:counter] = Hash.new 0
end