fix: set cmhub title read timeout to 600s
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user