From 4f7bd5d94a6bd665167ce2213ab58f46feccd456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A0=E7=A3=8A?= Date: Thu, 12 Dec 2024 16:42:35 +0800 Subject: [PATCH] add inner_config_dev_path --- src/common/config.py | 7 ++++++- src/handler/checker/check_list.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/config.py b/src/common/config.py index 24f93bee..77690afe 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -29,7 +29,12 @@ absPath = os.path.dirname(os.path.abspath(sys.executable)) else: absPath = os.path.dirname(os.path.abspath(__file__)) -INNER_CONFIG_FILE = os.path.join(absPath, "conf/inner_config.yml") +inner_config_release_path = os.path.join(absPath, "conf/inner_config.yml") +inner_config_dev_path = os.path.join(absPath, "../../conf/inner_config.yml") +if os.path.exists(inner_config_release_path): + INNER_CONFIG_FILE = inner_config_release_path +else: + INNER_CONFIG_FILE = inner_config_dev_path DEFAULT_CONFIG_DATA = ''' obcluster: diff --git a/src/handler/checker/check_list.py b/src/handler/checker/check_list.py index d60a5377..eb5decb5 100644 --- a/src/handler/checker/check_list.py +++ b/src/handler/checker/check_list.py @@ -37,7 +37,7 @@ def handle(self): result_map = {} for file in files: if "check_package" in file: - cases_map = {"all": {"name": "all", "command": "obdiag check", "info_en": "default check all task without filter", "info_cn": "默认执行除filter组里的所有巡检项"}} + cases_map = {"all": {"name": "all", "command": "obdiag check run", "info_en": "default check all task without filter", "info_cn": "默认执行除filter组里的所有巡检项"}} # Obtain which files match and corresponding header files # Using string segmentation methods parts = file.split('_')