mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-06 22:51:18 +08:00
Clear error when the job leaves a failure state.
This commit is contained in:
parent
db0fadf20c
commit
303825899e
@ -461,12 +461,12 @@ class DownloadJob:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def _set_status(self, status: str, error: Optional[str] = None) -> None:
|
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
|
self.state.status = status
|
||||||
if error is not None:
|
self.state.error = error
|
||||||
self.state.error = error
|
fields = {"status": status, "bytes_done": self.state.bytes_done, "error": error}
|
||||||
fields = {"status": status, "bytes_done": self.state.bytes_done}
|
|
||||||
if error is not None:
|
|
||||||
fields["error"] = error
|
|
||||||
if status == DownloadStatus.QUEUED:
|
if status == DownloadStatus.QUEUED:
|
||||||
fields["attempts"] = self.spec.attempts + 1
|
fields["attempts"] = self.spec.attempts + 1
|
||||||
self.spec.attempts += 1
|
self.spec.attempts += 1
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user