Use an OrderedDict for pipelines
So that status displays will show pipelines in the order defined in the config file. Change-Id: I2913c94dd44f4443f5bdca54241fd1af027258a8
This commit is contained in:
parent
b98fcdb499
commit
5a9918ae4b
|
@ -9,6 +9,7 @@ WebOb
|
|||
paramiko
|
||||
GitPython>=0.3.2.RC1
|
||||
lockfile
|
||||
ordereddict
|
||||
python-daemon
|
||||
extras
|
||||
statsd>=1.0.0,<3.0
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
import re
|
||||
import time
|
||||
from uuid import uuid4
|
||||
import extras
|
||||
|
||||
OrderedDict = extras.try_imports(['collections.OrderedDict',
|
||||
'ordereddict.OrderedDict'])
|
||||
|
||||
|
||||
MERGER_MERGE = 1 # "git merge"
|
||||
|
@ -916,7 +920,7 @@ class EventFilter(object):
|
|||
class Layout(object):
|
||||
def __init__(self):
|
||||
self.projects = {}
|
||||
self.pipelines = {}
|
||||
self.pipelines = OrderedDict()
|
||||
self.jobs = {}
|
||||
self.metajobs = []
|
||||
|
||||
|
|
|
@ -600,7 +600,6 @@ class Scheduler(threading.Thread):
|
|||
ret += '</p>'
|
||||
|
||||
keys = self.layout.pipelines.keys()
|
||||
keys.sort()
|
||||
for key in keys:
|
||||
pipeline = self.layout.pipelines[key]
|
||||
s = 'Pipeline: %s' % pipeline.name
|
||||
|
@ -631,7 +630,6 @@ class Scheduler(threading.Thread):
|
|||
pipelines = []
|
||||
data['pipelines'] = pipelines
|
||||
keys = self.layout.pipelines.keys()
|
||||
keys.sort()
|
||||
for key in keys:
|
||||
pipeline = self.layout.pipelines[key]
|
||||
pipelines.append(pipeline.formatStatusJSON())
|
||||
|
|
Loading…
Reference in New Issue