コード例 #1
0
ファイル: utils.py プロジェクト: CadeLaRen/Git-Auto-Deploy
class GADRunnerThread(threading.Thread):
    def __init__(self, config):
        super(GADRunnerThread, self).__init__()
        import sys
        import time

        from gitautodeploy import GitAutoDeploy

        self._app = GitAutoDeploy()
        self._app.setup(config)

        # Store PID and port in thread instance
        self.pid = self._app._pid
        self.port = self._app._port

    def run(self):
        self._app.handle_request()

    def exit(self):
        self._app.stop()
        self._app.close()
コード例 #2
0
class GADRunnerThread(threading.Thread):
    def __init__(self, config):
        super(GADRunnerThread, self).__init__()
        import sys
        import time

        from gitautodeploy import GitAutoDeploy

        self._app = GitAutoDeploy()
        self._app.setup(config)

        # Store PID and port in thread instance
        self.pid = self._app._pid
        self.port = self._app._port

    def run(self):
        self._app.handle_request()

    def exit(self):
        self._app.stop()
        self._app.close()
コード例 #3
0
class GADRunnerThread(threading.Thread):
    def __init__(self, config):
        super(GADRunnerThread, self).__init__()
        import sys
        import time

        from gitautodeploy import GitAutoDeploy

        self._app = GitAutoDeploy()
        self._app.setup(config)

        # Setup HTTP server, but do not start serving
        self._app.serve_http(serve_forever=False)

        # Store PID and port in thread instance
        self.pid = self._app._pid
        self.port = self._app._http_port

    def run(self):
        self._app._http_server.handle_request()

    def exit(self):
        self._app.stop()
        self._app.close()