fix: set cmhub title read timeout to 600s

This commit is contained in:
chengma
2026-07-06 22:51:28 +08:00
parent 71f8beae57
commit 0c2a04b176
5 changed files with 19 additions and 7 deletions
+2 -1
View File
@@ -37,6 +37,7 @@ class CMHubError(AIError):
CMHUB_IMAGE_MAX_BYTES = 20 * 1024 * 1024
CMHUB_TITLE_READ_TIMEOUT_SECONDS = 600
_RESOLUTION_SIZES = {
"512": (512, 512),
@@ -635,7 +636,7 @@ def _gen_title_cmhub(
runtime["api_key"],
payload=payload,
connect_timeout=runtime["connect_timeout"],
read_timeout=_cmhub_read_timeout(config, ai_cfg.get("resolution", "1k")),
read_timeout=CMHUB_TITLE_READ_TIMEOUT_SECONDS,
attempts=attempts,
on_retry=lambda attempt, total_attempts, exc: _notify_cmhub_retry(
on_step,