예제 #1
0
파일: proxy.py 프로젝트: ljdog/burst
    def __init__(self, app):
        """
        构造函数
        :return:
        """
        self.app = app

        self.task_dispatcher = TaskDispatcher(self,
                                              self._on_workers_reload_over)
        self.stat_counter = StatCounter(
            self.app.config['TASKS_TIME_BENCHMARK'])
예제 #2
0
    def __init__(self, app, host, port):
        """
        构造函数
        :return:
        """
        self.app = app
        self.host = host
        self.port = port

        self.task_dispatcher = TaskDispatcher()
        self.stat_counter = StatCounter(
            self.app.config['TASKS_TIME_BENCHMARK'])