diff options
| author | 2013-05-09 18:40:44 +0200 | |
|---|---|---|
| committer | 2013-05-12 14:54:39 +0200 | |
| commit | 0d9f1d9907cf5611cc6122d11798677bd0bd9f0a (patch) | |
| tree | 779a93cfe48fe125b36c9a5ca45347550b137b9f /module/plugins/hooks | |
| parent | Version 0.7: bugfix (diff) | |
| download | pyload-0d9f1d9907cf5611cc6122d11798677bd0bd9f0a.tar.xz | |
Version 0.8: improved timing
Diffstat (limited to 'module/plugins/hooks')
| -rw-r--r-- | module/plugins/hooks/RestartFailed.py | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/module/plugins/hooks/RestartFailed.py b/module/plugins/hooks/RestartFailed.py index 67dae19e7..c2834e424 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.7" +    __version__ = "0.8"      __description__ = "Restart failed packages according to defined rules"      __config__ = [          ("activated", "bool", "Activated", "True"), @@ -43,8 +43,9 @@ class RestartFailed(Hook):          self.info["dlfailed"] = 0          self.logDebug("called self.core.api.restartFailed()") -    def setTimer(self, timer): +    def setTimer(self, timer, interval):          self.info["timer"] = timer +        self.interval = interval          if timer:              self.manager.addEvent("periodical", doRestart)          else: @@ -64,7 +65,7 @@ class RestartFailed(Hook):          else:              newtimer = 1          if newtimer != timer: -            setTimer(newtimer) +            setTimer(newtimer, interval)          return value      def checkFailed(self, pyfile): @@ -78,7 +79,7 @@ class RestartFailed(Hook):      def arrangeChecks(self):          self.info["dlfailed"] = 1000          if self.getInfo("timer"): -            setTimer(0) +            setTimer(0, 60)      def configEvents(self):          if self.getConfig("dlFail"): | 
