From f14d015717da62b750d370b36812b3c117a3de89 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Tue, 28 Apr 2026 15:02:46 +0800 Subject: [PATCH] auto-sync: 2026-04-28 15:02:46 --- logs/auto-sync.log | 1 + scripts/backtest-service/result_storage.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/logs/auto-sync.log b/logs/auto-sync.log index 28d08001..d30b205d 100644 --- a/logs/auto-sync.log +++ b/logs/auto-sync.log @@ -5450,5 +5450,6 @@ + diff --git a/scripts/backtest-service/result_storage.py b/scripts/backtest-service/result_storage.py index 51263727..e8cc1903 100755 --- a/scripts/backtest-service/result_storage.py +++ b/scripts/backtest-service/result_storage.py @@ -40,7 +40,7 @@ class ResultStorage: info_file = os.path.join(task_dir, "task.json") with open(info_file, "w", encoding="utf-8") as f: - json.dump(task.model_dump(), f, indent=2, ensure_ascii=False) + json.dump(task.model_dump(), f, indent=2, ensure_ascii=False, default=_json_serial) def load_task(self, task_id: str, status: str) -> Optional[BacktestTaskWithId]: """加载任务信息""" @@ -62,7 +62,7 @@ class ResultStorage: result_file = os.path.join(task_dir, "result.json") with open(result_file, "w", encoding="utf-8") as f: - json.dump(result.model_dump(), f, indent=2, ensure_ascii=False) + json.dump(result.model_dump(), f, indent=2, ensure_ascii=False, default=_json_serial) def load_result(self, task_id: str, status: str) -> Optional[BacktestResult]: """加载回测结果"""