added slight time delay in while loop.

This commit is contained in:
Clinton Hall 2013-02-26 20:04:26 -08:00
commit c134c65adf

View file

@ -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)