summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Vuolter <vuolter@gmail.com> 2013-05-09 18:20:01 +0200
committerGravatar Vuolter <vuolter@gmail.com> 2013-05-12 14:54:37 +0200
commit5e9aa852a7be4685642f18679fd615748e4ec028 (patch)
treed333184fe2a0a423bcbe71d0a5839a9b4ca78452 /module
parentVersion 0.6: improved code + several bugfixes (diff)
downloadpyload-5e9aa852a7be4685642f18679fd615748e4ec028.tar.xz
Version 0.7: bugfix
Diffstat (limited to 'module')
-rw-r--r--module/plugins/hooks/RestartFailed.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py
index bc9ca699d..67dae19e7 100644
--- a/module/plugins/hooks/RestartFailed.py
+++ b/module/plugins/hooks/RestartFailed.py
@@ -23,7 +23,7 @@ import time
class RestartFailed(Hook):
__name__ = "RestartFailed"
- __version__ = "0.6"
+ __version__ = "0.7"
__description__ = "Restart failed packages according to defined rules"
__config__ = [
("activated", "bool", "Activated", "True"),
@@ -40,6 +40,7 @@ class RestartFailed(Hook):
def restart(self):
self.core.api.restartFailed()
+ self.info["dlfailed"] = 0
self.logDebug("called self.core.api.restartFailed()")
def setTimer(self, timer):
@@ -57,9 +58,9 @@ class RestartFailed(Hook):
newtimer = 0
value = False
if now >= lastrstime + interval:
+ self.restart()
self.info["lastrstime"] = now
value = True
- self.restart()
else:
newtimer = 1
if newtimer != timer:
@@ -69,8 +70,8 @@ class RestartFailed(Hook):
def checkFailed(self, pyfile):
curr = self.getInfo("dlfailed")
max = self.getConfig("dlFail_n")
- if curr >= max and doRestart():
- self.info["dlfailed"] = 0
+ if curr >= max:
+ doRestart()
else:
self.info["dlfailed"] = curr + 1