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'])
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'])