mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
A failed batch sub_task restarts for a re-run 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
3d643965b5
commit
30e3054146
1 changed files with 4 additions and 1 deletions
|
|
@ -35,11 +35,14 @@ class SubTask:
|
|||
)
|
||||
|
||||
def start(self, cloud_logs_url: Optional[str] = None) -> None:
|
||||
if self.status not in (SubTaskStatus.WAITING, SubTaskStatus.IN_PROGRESS):
|
||||
# FAILED may restart: a failed batch is re-run by re-sending its own
|
||||
# inputs, and its completion un-fails the parent Task (ADR-0055).
|
||||
if self.status is SubTaskStatus.COMPLETE:
|
||||
raise ValueError(f"cannot start subtask in status {self.status}")
|
||||
if self.job_started is None:
|
||||
self.job_started = datetime.now(timezone.utc)
|
||||
self.status = SubTaskStatus.IN_PROGRESS
|
||||
self.job_completed = None
|
||||
if cloud_logs_url is not None:
|
||||
self.cloud_logs_url = cloud_logs_url
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue