Skip to content

Commit

Permalink
fix reconfig priorities
Browse files Browse the repository at this point in the history
The reconfig code was sorting services in the reverse of the direction
the docs -- and all users of the priority -- indicated.
  • Loading branch information
djmitche committed Jan 13, 2012
1 parent 16302ad commit 8a78ee0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/config.py
Expand Up @@ -700,7 +700,7 @@ def reconfigService(self, new_config):
if isinstance(svc, ReconfigurableServiceMixin) ]

# sort by priority
reconfigurable_services.sort(key=lambda svc : svc.reconfig_priority)
reconfigurable_services.sort(key=lambda svc : -svc.reconfig_priority)

for svc in reconfigurable_services:
d = svc.reconfigService(new_config)
Expand Down
1 change: 0 additions & 1 deletion master/buildbot/test/unit/test_config.py
Expand Up @@ -1074,7 +1074,6 @@ def test_multiservice_priority(self):
@d.addCallback
def check(_):
prio_order = [ svc.called for svc in services ]
prio_order.reverse()
called_order = sorted(prio_order)
self.assertEqual(prio_order, called_order)
return d
Expand Down

0 comments on commit 8a78ee0

Please sign in to comment.