def startService(self): # first, apply all monkeypatches monkeypatches.patch_all() log.msg("Starting BuildSlave -- version: %s" % buildslave.version) if self.umask is not None: os.umask(self.umask) self.recordHostname(self.basedir) service.MultiService.startService(self)
def startService(self): # first, apply all monkeypatches monkeypatches.patch_all() log.msg("Starting BuildSlave -- version: %s" % buildslave.version) self.recordHostname(self.basedir) if self.umask is not None: os.umask(self.umask) service.MultiService.startService(self) if self.allow_shutdown == 'signal': log.msg("Setting up SIGHUP handler to initiate shutdown") signal.signal(signal.SIGHUP, self._handleSIGHUP) elif self.allow_shutdown == 'file': log.msg("Watching %s's mtime to initiate shutdown" % self.shutdown_file) if os.path.exists(self.shutdown_file): self.shutdown_mtime = os.path.getmtime(self.shutdown_file) self.shutdown_loop = l = task.LoopingCall(self._checkShutdownFile) l.start(interval=10)
# details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members import sys import twisted from twisted.trial import unittest from buildslave import monkeypatches # apply the same patches the slave does when it starts monkeypatches.patch_all() def add_debugging_monkeypatches(): """ DO NOT CALL THIS DIRECTLY This adds a few "harmless" monkeypatches which make it easier to debug failing tests. """ from twisted.application.service import Service old_startService = Service.startService old_stopService = Service.stopService def startService(self): assert not self.running return old_startService(self) def stopService(self):
# # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members import sys import twisted from buildslave import monkeypatches from twisted.trial import unittest # apply the same patches the slave does when it starts monkeypatches.patch_all(for_tests=True) def add_debugging_monkeypatches(): """ DO NOT CALL THIS DIRECTLY This adds a few "harmless" monkeypatches which make it easier to debug failing tests. """ from twisted.application.service import Service old_startService = Service.startService old_stopService = Service.stopService def startService(self): assert not self.running
# # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members import sys import twisted from buildslave import monkeypatches from twisted.trial import unittest # apply the same patches the slave does when it starts monkeypatches.patch_all(for_tests=True) def add_debugging_monkeypatches(): """ DO NOT CALL THIS DIRECTLY This adds a few "harmless" monkeypatches which make it easier to debug failing tests. """ from twisted.application.service import Service old_startService = Service.startService old_stopService = Service.stopService def startService(self):