summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaku Ytti <saku@ytti.fi>2014-07-11 21:14:52 +0300
committerSaku Ytti <saku@ytti.fi>2014-07-11 21:14:52 +0300
commit138f331d250c9dabeee79057fa9b6b5850732379 (patch)
treebc2606fa0cefe63e230098129404f10df66db899
parente3aa71fc17eba8586d2e0117b6b363942f577488 (diff)
reset retry count on success
-rw-r--r--lib/oxidized/node.rb1
-rw-r--r--lib/oxidized/worker.rb2
2 files changed, 2 insertions, 1 deletions
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