# HG changeset patch # User John W. Eaton # Date 1549640865 0 # Node ID bb8c4f263f94930bde4a9b3b96c5ba5f1d3cfda3 # Parent c8ce098ecc08e9c736806faa484d6f1fd3a2ca0f worker.tac: rename from slave.tac. diff -r c8ce098ecc08 -r bb8c4f263f94 slave.tac --- a/slave.tac Mon Jul 16 14:05:49 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - -import os - -from buildbot_worker.bot import Worker -from twisted.application import service - -basedir = '.' -rotateLength = 10000000 -maxRotatedFiles = 10 - -# if this is a relocatable tac file, get the directory containing the TAC -if basedir == '.': - import os.path - basedir = os.path.abspath(os.path.dirname(__file__)) - -# note: this line is matched against to check that this is a buildbot worker -# directory; do not edit it. -application = service.Application('buildbot-worker') - -try: - from twisted.python.logfile import LogFile - from twisted.python.log import ILogObserver, FileLogObserver - logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength, - maxRotatedFiles=maxRotatedFiles) - application.setComponent(ILogObserver, FileLogObserver(logfile).emit) -except ImportError: - # probably not yet twisted 8.2.0 and beyond, can't set log yet - pass - -buildmaster_host = 'buildbot.octave.org' -port = 9990 -workername = 'your-worker-name' -passwd = 'your-worker-password' -keepalive = 600 -maxdelay = 300 -numcpus = None -allow_shutdown = None -maxretries = None - -s = Worker(buildmaster_host, port, workername, passwd, basedir, - keepalive, maxdelay=maxdelay, - numcpus=numcpus, allow_shutdown=allow_shutdown, - maxRetries=maxretries) -s.setServiceParent(application) - diff -r c8ce098ecc08 -r bb8c4f263f94 worker.tac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/worker.tac Fri Feb 08 15:47:45 2019 +0000 @@ -0,0 +1,45 @@ + +import os + +from buildbot_worker.bot import Worker +from twisted.application import service + +basedir = '.' +rotateLength = 10000000 +maxRotatedFiles = 10 + +# if this is a relocatable tac file, get the directory containing the TAC +if basedir == '.': + import os.path + basedir = os.path.abspath(os.path.dirname(__file__)) + +# note: this line is matched against to check that this is a buildbot worker +# directory; do not edit it. +application = service.Application('buildbot-worker') + +try: + from twisted.python.logfile import LogFile + from twisted.python.log import ILogObserver, FileLogObserver + logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength, + maxRotatedFiles=maxRotatedFiles) + application.setComponent(ILogObserver, FileLogObserver(logfile).emit) +except ImportError: + # probably not yet twisted 8.2.0 and beyond, can't set log yet + pass + +buildmaster_host = 'buildbot.octave.org' +port = 9990 +workername = 'your-worker-name' +passwd = 'your-worker-password' +keepalive = 600 +maxdelay = 300 +numcpus = None +allow_shutdown = None +maxretries = None + +s = Worker(buildmaster_host, port, workername, passwd, basedir, + keepalive, maxdelay=maxdelay, + numcpus=numcpus, allow_shutdown=allow_shutdown, + maxRetries=maxretries) +s.setServiceParent(application) +