From 138f331d250c9dabeee79057fa9b6b5850732379 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 11 Jul 2014 21:14:52 +0300 Subject: reset retry count on success --- lib/oxidized/node.rb | 1 + lib/oxidized/worker.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/oxidized/node.rb b/lib/oxidized/node.rb index 72c84bd..188c267 100644 --- a/lib/oxidized/node.rb +++ b/lib/oxidized/node.rb @@ -111,6 +111,7 @@ module Oxidized def reset @user = @msg = @from = nil + @retry = 0 end private diff --git a/lib/oxidized/worker.rb b/lib/oxidized/worker.rb index 0e96212..e274e1e 100644 --- a/lib/oxidized/worker.rb +++ b/lib/oxidized/worker.rb @@ -36,6 +36,7 @@ module Oxidized msg += " with message '#{node.msg}'" if node.msg node.output.new.store node.name, job.config, :msg => msg, :user => node.user, :group => node.group + node.reset else msg = "#{node.name} status #{job.status}" if node.retry < CFG.retries @@ -48,7 +49,6 @@ module Oxidized end Log.warn msg end - node.reset end end end -- cgit v1.2.1