cosmetic changes

This commit is contained in:
Rudi Grinberg 2012-07-13 12:01:14 -04:00
parent 120305f383
commit a4c322efac
2 changed files with 4 additions and 6 deletions

View File

@ -61,7 +61,7 @@ class AirtimeProcessEvent(ProcessEvent):
path = path[0:pos] + "/"
list = self.api_client.list_all_watched_dirs()
# case where the dir that is being watched is moved to somewhere
# case where the dir that is being watched is moved to somewhere
if path in list[u'dirs'].values():
self.logger.info("Requesting the airtime server to remove '%s'", path)
res = self.api_client.remove_watched_dir(path)
@ -115,7 +115,7 @@ class AirtimeProcessEvent(ProcessEvent):
#event.name: filename
#event.pathname: pathname (str): Concatenation of 'path' and 'name'.
# we used to use IN_CREATE event, but the IN_CREATE event gets fired before the
# copy was done. Hence, IN_CLOSE_WRITE is the correct one to handle.
# copy was done. Hence, IN_CLOSE_WRITE is the correct one to handle.
def process_IN_CLOSE_WRITE(self, event):
if event.path in self.mount_file_dir:
return
@ -401,7 +401,7 @@ class AirtimeProcessEvent(ProcessEvent):
# handling those cases. We are manully calling handle_created_file
# function.
if os.path.exists(k):
# check if file is open
# check if file is open
try:
command = "lsof " + k
#f = os.popen(command)

View File

@ -7,7 +7,6 @@ from media.monitor.handler import ReportHandler
from media.monitor.events import NewFile, DeleteFile
from media.monitor.log import Loggable
from media.monitor.exceptions import BadSongFile
import media.monitor.pure as mmp
from media.monitor.pure import LazyProperty
import api_clients.api_client as ac
@ -25,7 +24,7 @@ class RequestSync(threading.Thread,Loggable):
def run(self):
# TODO : implement proper request sending
self.logger.info("launching request with %d items." % len(self.requests))
# self.apiclient.update_media_metadata(self
#self.apiclient.update_media_metadata(
self.watcher.flag_done()
class TimeoutWatcher(threading.Thread,Loggable):
@ -104,7 +103,6 @@ class WatchSyncer(ReportHandler,Loggable):
self.push_request()
self.request_do()
def events_in_queue(self):
"""returns true if there are events in the queue that haven't been processed yet"""
return len(self.__queue) > 0