mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-07 03:52:10 +08:00
don't retry if API returns task failure (#8111)
This commit is contained in:
parent
98ff01e148
commit
f3ff5c40db
@ -1105,7 +1105,7 @@ class PollingOperation(Generic[T, R]):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
# For other errors, increment count and potentially abort
|
# For other errors, increment count and potentially abort
|
||||||
consecutive_errors += 1
|
consecutive_errors += 1
|
||||||
if consecutive_errors >= max_consecutive_errors:
|
if consecutive_errors >= max_consecutive_errors or status == TaskStatus.FAILED:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f"Polling aborted after {consecutive_errors} consecutive errors: {str(e)}"
|
f"Polling aborted after {consecutive_errors} consecutive errors: {str(e)}"
|
||||||
) from e
|
) from e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user