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]: """加载回测结果"""