mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-03 13:19:23 +08:00
Clear error when the job leaves a failure state.
This commit is contained in:
parent
dba2bfbc02
commit
95b0758a88
@ -461,12 +461,12 @@ class DownloadJob:
|
||||
)
|
||||
|
||||
def _set_status(self, status: str, error: Optional[str] = None) -> None:
|
||||
# ``error`` is authoritative: passing None clears any prior failure
|
||||
# text so transitions out of a failure state (retry/success) don't
|
||||
# leave stale messages on RuntimeState or in the persisted row.
|
||||
self.state.status = status
|
||||
if error is not None:
|
||||
self.state.error = error
|
||||
fields = {"status": status, "bytes_done": self.state.bytes_done}
|
||||
if error is not None:
|
||||
fields["error"] = error
|
||||
self.state.error = error
|
||||
fields = {"status": status, "bytes_done": self.state.bytes_done, "error": error}
|
||||
if status == DownloadStatus.QUEUED:
|
||||
fields["attempts"] = self.spec.attempts + 1
|
||||
self.spec.attempts += 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user