CC-1799 Put Airtime Storage into a Human Readable File Naming Convention
experimenting with plupload.
This commit is contained in:
parent
8d9c0dab1a
commit
8a15144dc8
2 changed files with 10 additions and 12 deletions
|
@ -29,7 +29,6 @@ MODE_CREATE = "create"
|
|||
MODE_MODIFY = "modify"
|
||||
|
||||
global storage_directory
|
||||
global plupload_directory
|
||||
|
||||
# configure logging
|
||||
try:
|
||||
|
@ -297,13 +296,13 @@ class MediaMonitor(ProcessEvent):
|
|||
#shutil.move(event.pathname, filepath)
|
||||
os.rename(event.pathname, filepath)
|
||||
|
||||
try:
|
||||
#try:
|
||||
#set the owner of the imported file.
|
||||
pypo_uid = getpwnam('pypo')[2]
|
||||
os.chown(filepath, pypo_uid, -1)
|
||||
except Exception, e:
|
||||
self.logger.debug("Cannot change owner of file.")
|
||||
self.logger.debug("Error: %s:", e)
|
||||
#pypo_uid = getpwnam('pypo')[2]
|
||||
#os.chown(filepath, pypo_uid, -1)
|
||||
#except Exception, e:
|
||||
#self.logger.debug("Cannot change owner of file.")
|
||||
#self.logger.debug("Error: %s:", e)
|
||||
|
||||
self.update_airtime(filepath, MODE_CREATE)
|
||||
|
||||
|
@ -380,10 +379,6 @@ if __name__ == '__main__':
|
|||
logger.info("Added watch to %s", storage_directory)
|
||||
logger.info("wdd result %s", wdd[storage_directory])
|
||||
|
||||
wdd = wm.add_watch(plupload_directory, mask, rec=False, auto_add=True)
|
||||
logger.info("Added watch to %s", plupload_directory)
|
||||
logger.info("wdd result %s", wdd[plupload_directory])
|
||||
|
||||
notifier = AirtimeNotifier(wm, mm, read_freq=int(config["check_filesystem_events"]), timeout=1)
|
||||
notifier.coalesce_events()
|
||||
notifier.loop(callback=mm.check_rabbit_MQ)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue