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
110 lines
1.1 KiB
Batchfile
110 lines
1.1 KiB
Batchfile
@echo off
|
||
REM Windows批处理脚本 - 运行缺失值处理功能测试
|
||
|
||
echo ========================================
|
||
echo 缺失值处理功能 - 自动化测试
|
||
echo ========================================
|
||
echo.
|
||
|
||
REM 检查Python是否安装
|
||
python --version >nul 2>&1
|
||
if %errorlevel% neq 0 (
|
||
echo [错误] Python未安装或不在PATH中
|
||
pause
|
||
exit /b 1
|
||
)
|
||
|
||
echo [1/3] 检查Python服务状态...
|
||
curl -s http://localhost:8001/health >nul 2>&1
|
||
if %errorlevel% neq 0 (
|
||
echo [警告] Python服务未运行,请先启动服务:
|
||
echo cd extraction_service
|
||
echo python main.py
|
||
echo.
|
||
pause
|
||
exit /b 1
|
||
)
|
||
echo [OK] Python服务运行正常
|
||
echo.
|
||
|
||
echo [2/3] 检查依赖...
|
||
python -c "import pandas, numpy, requests" >nul 2>&1
|
||
if %errorlevel% neq 0 (
|
||
echo [警告] 缺少依赖,正在安装...
|
||
pip install pandas numpy requests
|
||
)
|
||
echo [OK] 依赖检查完成
|
||
echo.
|
||
|
||
echo [3/3] 运行测试...
|
||
echo.
|
||
python test_fillna_operations.py
|
||
|
||
echo.
|
||
echo ========================================
|
||
echo 测试完成
|
||
echo ========================================
|
||
pause
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|