Files
AIclinicalresearch/tests/run_tests.sh
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

106 lines
1.1 KiB
Bash
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.
#!/bin/bash
# Linux/Mac脚本 - 运行缺失值处理功能测试
echo "========================================"
echo "缺失值处理功能 - 自动化测试"
echo "========================================"
echo
# 检查Python是否安装
if ! command -v python3 &> /dev/null; then
echo "[错误] Python未安装"
exit 1
fi
echo "[1/3] 检查Python服务状态..."
if ! curl -s http://localhost:8001/health > /dev/null 2>&1; then
echo "[警告] Python服务未运行请先启动服务"
echo " cd extraction_service"
echo " python main.py"
echo
exit 1
fi
echo "[OK] Python服务运行正常"
echo
echo "[2/3] 检查依赖..."
python3 -c "import pandas, numpy, requests" 2> /dev/null
if [ $? -ne 0 ]; then
echo "[警告] 缺少依赖,正在安装..."
pip3 install pandas numpy requests
fi
echo "[OK] 依赖检查完成"
echo
echo "[3/3] 运行测试..."
echo
python3 test_fillna_operations.py
echo
echo "========================================"
echo "测试完成"
echo "========================================"