auto-sync: 2026-04-28 15:02:46

This commit is contained in:
cfdaily
2026-04-28 15:02:46 +08:00
parent 2ce946cb34
commit f14d015717
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -5450,5 +5450,6 @@
+2 -2
View File
@@ -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]:
"""加载回测结果"""