Files
AIclinicalresearch/backend/RESTART_SERVER_NOW.md
HaHafeng 61cdc97eeb feat(platform): Fix pg-boss queue conflict and add safety standards
Summary:
- Fix pg-boss queue conflict (duplicate key violation on queue_pkey)
- Add global error listener to prevent process crash
- Reduce connection pool from 10 to 4
- Add graceful shutdown handling (SIGTERM/SIGINT)
- Fix researchWorker recursive call bug in catch block
- Make screeningWorker idempotent using upsert

Security Standards (v1.1):
- Prohibit recursive retry in Worker catch blocks
- Prohibit payload bloat (only store fileKey/ID in job.data)
- Require Worker idempotency (upsert + unique constraint)
- Recommend task-specific expireInSeconds settings
- Document graceful shutdown pattern

New Features:
- PKB signed URL endpoint for document preview/download
- pg_bigm installation guide for Docker
- Dockerfile.postgres-with-extensions for pgvector + pg_bigm

Documentation:
- Update Postgres-Only async task processing guide (v1.1)
- Add troubleshooting SQL queries
- Update safety checklist

Tested: Local verification passed
2026-01-23 22:07:26 +08:00

70 lines
1.0 KiB
Markdown
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.
# ⚠️ 重要:需要重启服务器
## 修改内容
- ✅ 添加XML格式支持
- ✅ 更新消息处理逻辑
- ✅ 添加XML内容解析器
## 重启步骤
1. **停止当前服务器**
```
按 Ctrl+C在运行服务器的终端中
```
2. **重新启动服务器**
```powershell
cd D:\MyCursor\AIclinicalresearch\backend
npm run dev
```
3. **确认日志**
应该看到:
```
✅ 微信服务号回调控制器已初始化(明文模式)
Registered route: GET /wechat/patient/callback-plain (明文模式)
Registered route: POST /wechat/patient/callback-plain (明文模式, XML)
```
## 微信公众平台配置
| 配置项 | 值 |
|--------|-----|
| **URL** | `https://devlocal.xunzhengyixue.com/wechat/patient/callback-plain` |
| **Token** | `IitPatientWechat2026JanToken` |
| **消息加解密方式** | **明文模式** |
| **数据格式** | **XML** ⚠️ 必须选择XML |
---
**重启服务器后,即可在微信公众平台提交配置!**