auto-sync: 2026-04-28 23:39:46

This commit is contained in:
cfdaily
2026-04-28 23:39:46 +08:00
parent ea9374e831
commit 7d1f2d7c2f
3 changed files with 21 additions and 0 deletions
+4
View File
@@ -69125,3 +69125,7 @@ fatal: refusing to merge unrelated histories
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
/bin/sh: ./management/sanguo_auto_sync/auto-sync.sh: No such file or directory
+1
View File
@@ -5529,5 +5529,6 @@
@@ -77,6 +77,22 @@ class ResultStorage:
return BacktestResult(**data)
def find_task(self, task_id: str) -> Optional[BacktestTaskWithId]:
"""在所有状态目录中查找任务"""
for status_dir in ["running", "failed", "completed", "pending"]:
task = self.load_task(task_id, status_dir)
if task:
return task
return None
def find_result(self, task_id: str) -> Optional[BacktestResult]:
"""在所有状态目录中查找结果"""
for status_dir in ["failed", "completed", "running", "pending"]:
result = self.load_result(task_id, status_dir)
if result:
return result
return None
def get_task_path(self, task_id: str, status: str, filename: str) -> str:
"""获取任务文件路径"""
return os.path.join(self._task_dir(task_id, status), filename)