From 4c7ae89ebaac6e87d0b15e9d7ceff6f9407178a7 Mon Sep 17 00:00:00 2001 From: admin <admin@example.com> Date: 星期三, 15 一月 2025 15:38:00 +0800 Subject: [PATCH] 缓存目录修改 --- constant.py | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/constant.py b/constant.py index d45dbc6..1521f64 100644 --- a/constant.py +++ b/constant.py @@ -1,4 +1,5 @@ # 鏄惁涓烘祴璇� +import os import platform TEST = False @@ -56,11 +57,18 @@ return 'D:' if is_windows() else '/home/userzjj' +DATA_DIR_PATH = f"{get_path_prefix()}/local_storage_data" + +if not os.path.exists(DATA_DIR_PATH): + os.makedirs(DATA_DIR_PATH) + # 鏉垮潡鏁版嵁璺緞 -ALL_STOCKS_PLATE_PATH = f"{get_path_prefix()}/local_storage_data/all_stocks_plate_dict.json" +ALL_STOCKS_PLATE_PATH = f"{DATA_DIR_PATH}/all_stocks_plate_dict.json" # K绾胯矾寰� -K_BARS_PATH = f"{get_path_prefix()}/local_storage_data/all_stocks_all_K_line_property_dict.json" +K_BARS_PATH = f"{DATA_DIR_PATH}/all_stocks_all_K_line_property_dict.json" + +KPL_LIMIT_UP_DATA_PATH = f"{DATA_DIR_PATH}/limit_up_block_date_data.json" -- Gitblit v1.8.0