CC-3789: Need to place rejected files into /problem_files directory

-done
This commit is contained in:
Martin Konecny 2012-05-09 00:02:02 -04:00
parent f769472252
commit 4caba5bdea
4 changed files with 26 additions and 8 deletions

View file

@ -1,8 +1,13 @@
from mediaconfig import AirtimeMediaConfig
import mediamonitorcommon
import traceback
import os
class MediaMonitorWorkerProcess:
def __init__(self, config, mmc):
self.config = config
self.mmc = mmc
#this function is run in its own process, and continuously
#checks the queue for any new file events.
@ -17,6 +22,7 @@ class MediaMonitorWorkerProcess:
notifier.update_airtime(event)
else:
notifier.logger.warn("Liquidsoap integrity check for file at %s failed. Not adding to media library.", filepath)
self.mmc.move_file(filepath, os.path.join(self.config.problem_directory, os.path.basename(filepath)))
else:
notifier.update_airtime(event)
except Exception, e: