Exemple #1
0
    def startService(self):
        WorkerBase.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)
Exemple #2
0
    def startService(self):
        WorkerBase.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)
Exemple #3
0
    def startService(self):
        # importing here to avoid dependency on buildbot master package
        from buildbot.worker.protocols.null import Connection

        yield WorkerBase.startService(self)
        self.workername = self.name
        conn = Connection(self)
        # I don't have a master property, but my parent has.
        master = self.parent.master
        res = yield master.workers.newConnection(conn, self.name)
        if res:
            yield self.parent.attached(conn)
Exemple #4
0
    def startService(self):
        # importing here to avoid dependency on buildbot master package
        # requires buildot version >= 0.9.0b5
        from buildbot.worker.protocols.null import Connection

        yield WorkerBase.startService(self)
        self.workername = self.name
        conn = Connection(self.parent, self)
        # I don't have a master property, but my parent has.
        master = self.parent.master
        res = yield master.workers.newConnection(conn, self.name)
        if res:
            yield self.parent.attached(conn)
Exemple #5
0
    def startService(self):
        # importing here to avoid dependency on buildbot master package
        # requires buildot version >= 0.9.0b5
        from buildbot.worker.protocols.null import Connection

        yield WorkerBase.startService(self)
        # TODO: This is a workaround for using worker with "slave"-api with
        # updated master.  Later buildbot-slave package will be replaced with
        # buildbot-worker package which will be "slave"-free, and this patch
        # will not be needed.
        self._workername = self.name
        conn = Connection(self.parent, self)
        # I don't have a master property, but my parent has.
        master = self.parent.master
        # TODO: This is a workaround for using worker with "slave"-api with
        # updated master.  Later buildbot-slave package will be replaced with
        # buildbot-worker package which will be "slave"-free, and this patch
        # will not be needed.
        res = yield master.workers.newConnection(conn, self.name)
        if res:
            yield self.parent.attached(conn)
Exemple #6
0
    def startService(self):
        # importing here to avoid dependency on buildbot master package
        # requires buildot version >= 0.9.0b5
        from buildbot.worker.protocols.null import Connection

        yield WorkerBase.startService(self)
        # TODO: This is a workaround for using worker with "slave"-api with
        # updated master.  Later buildbot-slave package will be replaced with
        # buildbot-worker package which will be "slave"-free, and this patch
        # will not be needed.
        self._workername = self.name
        conn = Connection(self.parent, self)
        # I don't have a master property, but my parent has.
        master = self.parent.master
        # TODO: This is a workaround for using worker with "slave"-api with
        # updated master.  Later buildbot-slave package will be replaced with
        # buildbot-worker package which will be "slave"-free, and this patch
        # will not be needed.
        res = yield master.workers.newConnection(conn, self.name)
        if res:
            yield self.parent.attached(conn)