From cb89e12e9740332e80e8cfc59c25a3938c926868 Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 20 May 2012 23:13:53 +0200 Subject: [PATCH] Force quit after 30seconds --- couchpotato/core/_base/_core/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/couchpotato/core/_base/_core/main.py b/couchpotato/core/_base/_core/main.py index f7abddec..c1a24c3d 100644 --- a/couchpotato/core/_base/_core/main.py +++ b/couchpotato/core/_base/_core/main.py @@ -92,6 +92,7 @@ class Core(Plugin): log.debug('Every plugin got shutdown event') loop = True + starttime = time.time() while loop: log.debug('Asking who is running') still_running = fireEvent('plugin.running', merge = True) @@ -99,6 +100,8 @@ class Core(Plugin): if len(still_running) == 0: break + elif starttime < time.time() - 30: # Always force break after 30s wait + break running = list(set(still_running) - set(self.ignore_restart)) if len(running) > 0: