auto-sync: 2026-04-28 15:02:46
This commit is contained in:
@@ -5450,5 +5450,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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]:
|
||||
"""加载回测结果"""
|
||||
|
||||
Reference in New Issue
Block a user