Files
inquiry_robot/.cursor/rules/graph-redis.mdc
T

16 lines
869 B
Plaintext
Raw 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: 结合 prompt/14:何时用 LangGraph 与 Redis、怎么用
globs: "**/*.{py,ts}"
alwaysApply: true
---
# Graph/Redis = `prompt/14-LangGraph与Redis.md`
实现编排或队列前必须自己打开 14。
**Graph 用在**一单多次停等(补问、卡、主账、PDF)。不用来收企微、抽字段、当六态、转 PDF。
怎么用:一单 `thread_id`;checkpoint 在 PostgreSQL(新系统 `inquiry_robot_runtime`);停点中断;入站 resume 或 Worker 结构化 wake。无 `sender_id` 不进图。图成功≠主账成功。
**Redis 用在**队列、短幂等、token 缓存、限流。不用当六态、checkpoint、附件、Worker 全局单例、TMS 伪造开关。
怎么用:`REDIS_URL` + 环境前缀。新系统 `/1` 与 `inquiry_robot:`。回调禁止同步等 LLM。与现网同机必须换 db/前缀,禁止 FLUSHALL。