cc-4105: removed workarond for old bug. bug was: events not being removed from contractor

This commit is contained in:
Rudi Grinberg 2012-08-13 12:52:36 -04:00
parent 4708d76091
commit e4a756075a
2 changed files with 5 additions and 6 deletions

View File

@ -82,8 +82,9 @@ class BaseEvent(Loggable):
# pack will only throw an exception if it processes one file but this # pack will only throw an exception if it processes one file but this
# is a little bit hacky # is a little bit hacky
try: try:
return self.pack() ret = self.pack()
self._pack_hook() self._pack_hook()
return ret
except BadSongFile as e: return [e] except BadSongFile as e: return [e]
# nothing to see here, please move along # nothing to see here, please move along

View File

@ -3,7 +3,6 @@ import threading
import time import time
import copy import copy
import traceback import traceback
from itertools import ifilter
from media.monitor.handler import ReportHandler from media.monitor.handler import ReportHandler
from media.monitor.log import Loggable from media.monitor.log import Loggable
@ -34,8 +33,7 @@ class RequestSync(threading.Thread,Loggable):
# TODO : recorded shows aren't flagged right # TODO : recorded shows aren't flagged right
# Is this retry shit even necessary? Consider getting rid of this. # Is this retry shit even necessary? Consider getting rid of this.
packed_requests = [] packed_requests = []
for request_event in ifilter(lambda x: not x.morph_target(), for request_event in self.requests:
self.requests):
try: try:
for request in request_event.safe_pack(): for request in request_event.safe_pack():
if isinstance(request, BadSongFile): if isinstance(request, BadSongFile):
@ -123,8 +121,8 @@ class WatchSyncer(ReportHandler,Loggable):
try: try:
# If there is a strange bug anywhere in the code the next line # If there is a strange bug anywhere in the code the next line
# should be a suspect # should be a suspect
self.contractor.register( event ) if self.contractor.register( event ):
self.push_queue( event ) self.push_queue( event )
except BadSongFile as e: except BadSongFile as e:
self.fatal_exception("Received bas song file '%s'" % e.path, e) self.fatal_exception("Received bas song file '%s'" % e.path, e)
except Exception as e: except Exception as e: