Previous: Buildslave Options, Up: Creating a buildslave


2.7.2 Other Buildslave Configuration

unicode_encoding
This represents the encoding that buildbot should use when converting unicode commandline arguments into byte strings in order to pass to the operating system when spawning new processes.

The default value is what python's sys.getfilesystemencoding() returns, which on Windows is 'mbcs', on Mac OSX is 'utf-8', and on Unix depends on your locale settings.

If you need a different encoding, this can be changed in your build slave's buildbot.tac file by adding a unicode_encoding argument to the BuildSlave constructor.

allow_shutdown
allow_shutdown can be passed to the BuildSlave constructor in buildbot.tac. If set, it allows the buildslave to initiate a graceful shutdown, meaning that it will ask the master to shut down the slave when the current build, if any, is complete.

Setting allow_shutdown to 'file' will cause the buildslave to watch 'shutdown.stamp' in basedir for updates to its mtime. When the mtime changes, the slave will request a graceful shutdown from the master. The file does not need to exist prior to starting the slave.

Setting allow_shutdown to 'signal' will set up a SIGHUP handler to start a graceful shutdown. When the signal is received, the slave will request a graceful shutdown from the master.

The default value is None, in which case this feature will be disabled.

Both master and slave must be at least version 0.8.3 for this feature to work.

          s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
                         keepalive, usepty, umask=umask, maxdelay=maxdelay,
                         unicode_encoding='utf-8', allow_shutdown='signal')