Пример #1
0
    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'])