fix: dispatcher/poller 超时改为分离模式,stale_timeout 缩短到 10 分钟

- dispatcher 上传 timeout 从 300s 改为 (10s connect, 60s read)
  避免大文件上传无限阻塞 dispatcher 线程
- poller 拉取 timeout 从 30s 改为 (10s connect, 15s read)
- stale_timeout 从 3600s 缩短到 600s(10 分钟)
  更快回收卡死的 PROCESSING 任务
This commit is contained in:
ericwyuan
2026-08-20 12:12:19 +08:00
parent 02da23ef42
commit 4f0f19bccd
3 changed files with 3 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ class Dispatcher:
self.edge_url,
data=payload,
files={'video': (os.path.basename(video_path), fh, 'video/mp4')},
timeout=self.upload_timeout
timeout=(10, 60)
)
except requests.RequestException as e:
logger.error(f"[task_id={task_id}] 上传失败: {e}")