diff options
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index d1dffb6c7..259e2cd0c 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -373,6 +373,8 @@ class Core(object): self.scheduler.addJob(0, self.accountManager.getAccountInfos) + self.server_methods.delete_finished() + while True: sleep(2) if self.do_restart: @@ -865,6 +867,15 @@ class ServerMethods(): end = self.core.config['reconnect']['endTime'].split(":") return self.core.compare_time(start, end) + def delete_finished(self): + """ delete all finished links + packages, returns deleted packages """ + deleted = self.core.files.deleteFinishedLinks() + return deleted + + def restart_failed(self): + """ restart all failed links """ + self.core.files.restartFailed() + def deamon(): try: pid = os.fork() |