Skip to content

Commit

Permalink
Streamline master/slave .tac files so that the common parts appears f…
Browse files Browse the repository at this point in the history
…irst (no functionality change intended)
  • Loading branch information
krajaratnam committed Feb 15, 2010
1 parent 4fff586 commit d7dcf3e
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions buildbot/scripts/runner.py
Expand Up @@ -530,11 +530,8 @@ def postOptions(self):
from twisted.application import service
from buildbot.master import BuildMaster, DB
basedir = r'%(basedir)s'
configfile = r'%(config)s'
rotateLength = %(log-size)s
maxRotatedFiles = %(log-count)s
db = %(db)s
application = service.Application('buildmaster')
try:
Expand All @@ -546,7 +543,13 @@ def postOptions(self):
except ImportError:
# probably not yet twisted 8.2.0 and beyond, can't set log yet
pass
BuildMaster(basedir, configfile, db).setServiceParent(application)
basedir = r'%(basedir)s'
configfile = r'%(config)s'
db = %(db)s
m = BuildMaster(basedir, configfile, db)
m.setServiceParent(application)
"""

Expand Down Expand Up @@ -635,15 +638,6 @@ def postOptions(self):
from twisted.application import service
from buildbot.slave.bot import BuildSlave
basedir = r'%(basedir)s'
buildmaster_host = '%(host)s'
port = %(port)d
slavename = '%(name)s'
passwd = '%(passwd)s'
keepalive = %(keepalive)d
usepty = %(usepty)d
umask = %(umask)s
maxdelay = %(maxdelay)d
rotateLength = %(log-size)s
maxRotatedFiles = %(log-count)s
Expand All @@ -657,6 +651,17 @@ def postOptions(self):
except ImportError:
# probably not yet twisted 8.2.0 and beyond, can't set log yet
pass
basedir = r'%(basedir)s'
buildmaster_host = '%(host)s'
port = %(port)d
slavename = '%(name)s'
passwd = '%(passwd)s'
keepalive = %(keepalive)d
usepty = %(usepty)d
umask = %(umask)s
maxdelay = %(maxdelay)d
s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
keepalive, usepty, umask=umask, maxdelay=maxdelay)
s.setServiceParent(application)
Expand Down

0 comments on commit d7dcf3e

Please sign in to comment.