cc-4235: removed some magic to find bug
This commit is contained in:
parent
1dbdadef62
commit
a87a790ce6
|
@ -25,7 +25,7 @@ check_airtime_events = 30 #how long to queue metadata input from airtime.
|
|||
touch_interval = 5
|
||||
chunking_number = 450
|
||||
request_max_wait = 3.0
|
||||
rmq_event_wait = 0.5
|
||||
rmq_event_wait = 0.1
|
||||
logpath = '/var/log/airtime/media-monitor/media-monitor.log'
|
||||
index_path = '/var/tmp/airtime/media-monitor/last_index'
|
||||
|
||||
|
|
|
@ -47,5 +47,6 @@ class EventContractor(Loggable):
|
|||
return True # We actually added something, hence we return true.
|
||||
|
||||
def __unregister(self, evt):
|
||||
self.logger.info("Unregistering. Left: '%d'" % len(self.store.keys()))
|
||||
try: del self.store[evt.path]
|
||||
except Exception as e: self.unexpected_exception(e)
|
||||
|
|
|
@ -66,9 +66,11 @@ class BaseListener(object):
|
|||
|
||||
class OrganizeListener(BaseListener, pyinotify.ProcessEvent, Loggable):
|
||||
def process_IN_CLOSE_WRITE(self, event):
|
||||
self.logger.info("===> IN_CLOSE_WRITE : '%s'" % event.pathname)
|
||||
self.process_to_organize(event)
|
||||
# got cookie
|
||||
def process_IN_MOVED_TO(self, event):
|
||||
self.logger.info("===> IN_MOVED_TO : '%s'" % event.pathname)
|
||||
self.process_to_organize(event)
|
||||
|
||||
def flush_events(self, path):
|
||||
|
@ -85,7 +87,6 @@ class OrganizeListener(BaseListener, pyinotify.ProcessEvent, Loggable):
|
|||
flushed += 1
|
||||
self.logger.info("Flushed organized directory with %d files" % flushed)
|
||||
|
||||
@mediate_ignored
|
||||
@IncludeOnly(mmp.supported_extensions)
|
||||
def process_to_organize(self, event):
|
||||
dispatcher.send(signal=self.signal, sender=self,
|
||||
|
|
|
@ -15,16 +15,16 @@ class Organizer(ReportHandler,Loggable):
|
|||
StoreWatchListener)
|
||||
"""
|
||||
|
||||
_instance = None
|
||||
def __new__(cls, channel, target_path, recorded_path):
|
||||
if cls._instance:
|
||||
cls._instance.channel = channel
|
||||
cls._instance.target_path = target_path
|
||||
cls._instance.recorded_path = recorded_path
|
||||
else:
|
||||
cls._instance = super(Organizer, cls).__new__( cls, channel,
|
||||
target_path, recorded_path)
|
||||
return cls._instance
|
||||
#_instance = None
|
||||
#def __new__(cls, channel, target_path, recorded_path):
|
||||
#if cls._instance:
|
||||
#cls._instance.channel = channel
|
||||
#cls._instance.target_path = target_path
|
||||
#cls._instance.recorded_path = recorded_path
|
||||
#else:
|
||||
#cls._instance = super(Organizer, cls).__new__( cls, channel,
|
||||
#target_path, recorded_path)
|
||||
#return cls._instance
|
||||
|
||||
def __init__(self, channel, target_path, recorded_path):
|
||||
self.channel = channel
|
||||
|
|
|
@ -124,7 +124,8 @@ class WatchSyncer(ReportHandler,Loggable):
|
|||
try:
|
||||
# If there is a strange bug anywhere in the code the next line
|
||||
# should be a suspect
|
||||
if self.contractor.register( event ):
|
||||
#if self.contractor.register( event ):
|
||||
#self.push_queue( event )
|
||||
self.push_queue( event )
|
||||
except BadSongFile as e:
|
||||
self.fatal_exception("Received bas song file '%s'" % e.path, e)
|
||||
|
|
Loading…
Reference in New Issue