From 01a2bdfc60f4c9ea8b92db4ab7d444b9808631e4 Mon Sep 17 00:00:00 2001 From: aszerW Date: Tue, 28 Oct 2025 21:13:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E9=A9=AC=E4=B8=8A=E5=BC=80=E5=A7=8B=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=8C=87=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- signal_calc.py | 13 +++++++------ update_data.py | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/signal_calc.py b/signal_calc.py index 1e3e3c7..6e7606b 100644 --- a/signal_calc.py +++ b/signal_calc.py @@ -53,7 +53,7 @@ def get_index_recent_date(code: str, limit: int = None) -> pd.DataFrame: return df -def main(): +def main_calc_process(): if datetime.today().weekday() >= 5: logger.info(f"非交易日") return @@ -111,9 +111,10 @@ def main(): if __name__ == "__main__": + ... # main() - logger.info(datetime.now()) - schedule.every().day.at("19:00").do(main) - while True: - schedule.run_pending() - time.sleep(1) + # logger.info(datetime.now()) + # schedule.every().day.at("19:00").do(main) + # while True: + # schedule.run_pending() + # time.sleep(1) diff --git a/update_data.py b/update_data.py index af1dd73..0f1ba97 100644 --- a/update_data.py +++ b/update_data.py @@ -9,6 +9,7 @@ import time import traceback from dingtalk import DingTalkBot import os +from signal_calc import main_calc_process webhook = "https://oapi.dingtalk.com/robot/send?access_token=21de667159edadd33172c6ec414a2addf9c6359189350ffd36819d2a20e8a0f4" secret = "SEC43a0fa0b29717f98637a119b92a0bd5f7b2b6da671bdd2bd1279ed8323454d5e" @@ -95,6 +96,7 @@ def main(): if len(res) == 0: res = db_manager.insert_dataframe(df, "index_kline") logger.info(res) + main_calc_process() except Exception as e: error_message = f"{e}\n{traceback.format_exc()}" logger.error(error_message)