Only count live items for relative priority

Non-live items in a pipeline don't have node requests, so don't
penalize long patch series by counting the non-live ancestors
of changes when calculating relative_priority.

Change-Id: I7ec63e2ea4403087dd43c3b15eb703a2fa5542a7
This commit is contained in:
James E. Blair 2018-11-30 15:08:39 -08:00 committed by Tobias Henkel
parent 505c32e4b2
commit 101ec7c486
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,9 @@ class PipelineManager(object):
def getNodePriority(self, item):
items = self.pipeline.getAllItems()
items = [i for i in items if i.change.project == item.change.project]
items = [i for i in items
if i.change.project == item.change.project and
i.live]
for idx, val in enumerate(items):
if item == val:
return idx