From c134c65adf4032ab657f82da40c91ab86240bb71 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Tue, 26 Feb 2013 20:04:26 -0800 Subject: [PATCH] added slight time delay in while loop. --- TorrentToMedia.py | 1 + 1 file changed, 1 insertion(+) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 4f5696d6..08170309 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -435,6 +435,7 @@ while os.path.exists(videofile): # while this file is still here, CPS hasn't fi if (datetime.datetime.now() - now) > datetime.timedelta(minutes=3): # note; minimum 1 minute delay in autoProcessMovie Logger.info("MAIN: The file %s has not been moved after 3 minutes.") break + time.sleep(10) #Just stop this looping infinitely and hogging resources for 3 minutes ;) else: # CPS (and SickBeard) have finished. We can now resume seeding. Logger.info("MAIN: The file %s has been moved. Postprocessing appears to have succeeded." % videofile)