refactored file mediator to play nice with saas

This commit is contained in:
Rudi Grinberg 2012-11-19 20:13:00 -05:00
parent 8696571b02
commit ebca3fa9f5
3 changed files with 20 additions and 23 deletions

View file

@ -13,9 +13,8 @@ from media.monitor.log import Loggable
from media.monitor.syncdb import AirtimeDB
from media.monitor.exceptions import DirectoryIsNotListed
from media.monitor.bootstrap import Bootstrapper
from media.monitor.listeners import FileMediator
from media.saas.thread import apc
from media.saas.thread import apc, user
class AirtimeNotifier(Loggable):
"""
@ -192,7 +191,7 @@ class AirtimeMessageReceiver(Loggable):
# request that we'd normally get form pyinotify. But right
# now event contractor would take care of this sort of
# thing anyway so this might not be necessary after all
FileMediator.ignore(msg['filepath'])
user().file_mediator.ignore(msg['filepath'])
os.unlink(msg['filepath'])
# Verify deletion:
if not os.path.exists(msg['filepath']):