Skip to content

Commit f3ff5c4

Browse files
don't retry if API returns task failure (Comfy-Org#8111)
1 parent 98ff01e commit f3ff5c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy_api_nodes/apis/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ def _poll_until_complete(self, client: ApiClient) -> R:
11051105
except Exception as e:
11061106
# For other errors, increment count and potentially abort
11071107
consecutive_errors += 1
1108-
if consecutive_errors >= max_consecutive_errors:
1108+
if consecutive_errors >= max_consecutive_errors or status == TaskStatus.FAILED:
11091109
raise Exception(
11101110
f"Polling aborted after {consecutive_errors} consecutive errors: {str(e)}"
11111111
) from e

0 commit comments

Comments
 (0)