Files
inquiry_robot/.cursor/rules/no-blocking-threads.mdc

17 lines
758 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: 禁止卡顿;回调快回;慢活用多线程槽,LibreOffice 仅 1 槽
alwaysApply: true
---
# 不允许系统卡顿
回调、H5、健康检查必须秒回。禁止在请求线程里等完整 LLM、跑 Graph `invoke`、转 PDF、忙等 Redis。
尽量多线程:HTTP 线程池;Worker 进程内 HTTP 类至少 2~3 槽;inbox/outbox 独立线程,不和 soffice 排一条队。
LibreOffice **只许 1 槽**(两台 soffice 会互抢)。这不是整进程单线程。
禁止一把大锁串行所有工单。防重入只锁同一条任务 / 同一 `thread_id` 写冲突。不同工单必须能并行。
不要 Redis 全局 Worker 单例锁(`wecom:worker:singleton`)。服务只起一份;同一消息靠任务认领。