Skip to content

Fix bug: don't retry request if API reports task failure#8111

Merged
comfyanonymous merged 1 commit intoComfy-Org:masterfrom
christian-byrne:fix-fail-task-poll
May 14, 2025
Merged

Fix bug: don't retry request if API reports task failure#8111
comfyanonymous merged 1 commit intoComfy-Org:masterfrom
christian-byrne:fix-fail-task-poll

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented May 14, 2025

Fixes issue in which the polling retry logic is triggered when the API reports the task has failed.

This code:

https://github.com/comfyanonymous/ComfyUI/blob/98ff01e1486353a3b0ddd8fa82fcbb25401f8364/comfy_api_nodes/apis/client.py#L1074-L1077

raises exception, which is caught by the except at bottom of while block, meant for catching network-related errors. There is a counter that is incremented for consecutive errors to prevent this, but it is reset to 0 since the response technically succeeded (successful response of API reporting that the task failed on their end).

@christian-byrne christian-byrne changed the title Fix bug: etry if API returns task failure Fix bug: don't retry request if API reports task failure May 14, 2025
@comfyanonymous comfyanonymous merged commit f3ff5c4 into Comfy-Org:master May 14, 2025
5 checks passed
@christian-byrne christian-byrne deleted the fix-fail-task-poll branch May 14, 2025 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants