Skip to content

Commit

Permalink
debug用: 只使用1台蹲饼器配置
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungHector committed Jan 23, 2025
1 parent 9580406 commit ad73c84
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def update(self, maintainer=None):
latest_config_pool['MOOK'] = mook_config_pool['MOOK']
return is_valid, latest_config_pool

def _update(self, maintainer=None, is_mook=False):
def _update(self, maintainer=None, is_mook=False, is_debug=True):
"""
实时状态从 maintainer 中获取.
Expand Down Expand Up @@ -124,6 +124,12 @@ def _update(self, maintainer=None, is_mook=False):
# fetcher_name_list = ['SilverAsh', 'Saria']
fetcher_name_list = maintainer.alive_instance_id_list

# 终末地时期debug用
logger.warning('alive_instance_id_list is: {}'.format(alive_instance_id_list))
if is_debug:
# 为确保一个蹲饼器可以蹲到,只配置一台存活
fetcher_name_list = [fetcher_name_list[-1]]

# 模拟平台只有一个蹲饼器.
if is_mook:
fetcher_name_list = ['MOOK']
Expand Down

0 comments on commit ad73c84

Please sign in to comment.