Fix problem with duplicate change suppression.

Jobs for changes weren't being launched for DependentQueueManagers
because its addChange method called the superclass's addChange,
which had the same duplicate suppresion logic.  This breaks
out the bulk of that into a private method that can be called
by both classes.

Change-Id: Ib47be82f255bab38ce03c7af7fb5b700e1956aaa
This commit is contained in:
James E. Blair 2012-07-17 11:16:35 -07:00
parent 4e77ac9726
commit 692c6b3d32
1 changed files with 4 additions and 1 deletions

View File

@ -415,6 +415,9 @@ class BaseQueueManager(object):
self.log.debug("Change %s is already in queue, ignoring" % change)
return
self.log.debug("Adding change %s" % change)
self._addChange(change)
def _addChange(self, change):
if self.start_action:
try:
self.log.info("Reporting start, action %s change %s" % (
@ -600,7 +603,7 @@ class DependentQueueManager(BaseQueueManager):
self.log.debug("Adding change %s to queue %s" % (
change, change_queue))
change_queue.enqueueChange(change)
super(DependentQueueManager, self).addChange(change)
self._addChange(change)
def _getDependentChanges(self, change):
orig_change = change