Skip to content

Commit

Permalink
Make BuildslaveManager an AsyncMultiService
Browse files Browse the repository at this point in the history
Without this, slow service starts (e.g., buildslave) can continue on
even after the parent service has indicated it is done starting.  Fixes #3066.
  • Loading branch information
djmitche committed Nov 30, 2014
1 parent 086c81f commit 678d6c2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions master/buildbot/buildslave/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
from buildbot.buildslave.protocols import pb as bbpb
from buildbot.process import metrics
from buildbot.util import misc
from buildbot.util.service import ReconfigurableServiceMixin
from twisted.application import service
from buildbot.util import service
from twisted.internet import defer
from twisted.python import log
from twisted.python import reflect
Expand Down Expand Up @@ -57,15 +56,15 @@ def getPBPort(self):
return self.pbReg.getPort()


class BuildslaveManager(ReconfigurableServiceMixin,
service.MultiService):
class BuildslaveManager(service.ReconfigurableServiceMixin,
service.AsyncMultiService):

name = "buildslaves"
PING_TIMEOUT = 10
reconfig_priority = 127

def __init__(self, master):
service.MultiService.__init__(self)
service.AsyncMultiService.__init__(self)
self.setName('buildslaves')
self.master = master

Expand All @@ -91,8 +90,8 @@ def reconfigService(self, new_config):
yield self.reconfigServiceSlaves(new_config)

# reconfig any newly-added change sources, as well as existing
yield ReconfigurableServiceMixin.reconfigService(self,
new_config)
yield service.ReconfigurableServiceMixin.reconfigService(self,
new_config)

@defer.inlineCallbacks
def reconfigServiceSlaves(self, new_config):
Expand Down

0 comments on commit 678d6c2

Please sign in to comment.