Ensure a change's project is relevant.

If an event matches a queue, but is for a project that is
unknown by the queue (but otherwise known), don't do anything
with that event in that queue.

Change-Id: I1f0d9ebcd6539cdbdaba905415765bf779814d03
This commit is contained in:
James E. Blair 2012-06-04 14:15:42 -07:00
parent bcfc3c60b0
commit 9d43ac139e
2 changed files with 7 additions and 3 deletions

View File

@ -250,6 +250,8 @@ class Change(object):
def findJobsToRun(self):
tree = self.project.getJobTreeForQueue(self.queue_name)
if not tree:
return []
return self._findJobsToRun(tree.job_trees)
def areAllJobsComplete(self):

View File

@ -406,9 +406,11 @@ class DependentQueueManager(BaseQueueManager):
def addChange(self, change):
self.log.debug("Adding change %s" % change)
change_queue = self.getQueue(change.project)
self.log.debug("Adding change %s to queue %s" % (change, change_queue))
change_queue.enqueueChange(change)
super(DependentQueueManager, self).addChange(change)
if change_queue:
self.log.debug("Adding change %s to queue %s" % (
change, change_queue))
change_queue.enqueueChange(change)
super(DependentQueueManager, self).addChange(change)
def _getDependentChanges(self, change):
changes = []