-
李文光 authored
采集 upsert_ingest_candidate 与整包 replace_state 在无 ORM relationship 时,SQLAlchemy 同一 commit 内不保证按外键依赖顺序插入,子表(ingest_items / tasks / recruitment_events)可能在父行(candidates / resume_files / offers)存在前被写入,SQLite 开启 PRAGMA foreign_keys 时报 FOREIGN KEY constraint failed。 - ingest: 在添加 ingest_items 前显式 flush 父行。 - state: 在候选人/Offer/任务各循环后显式 flush,强制 岗位→候选人→Offer→任务→事件 顺序;并对任务/事件的外键做兜底:目标行不存在时置空,避免孤儿引用(如迁入 _pool 又被清空的候选人)导致 500。 - 新增开启外键约束的回归测试(测试夹具引擎未开 PRAGMA,此前掩蔽此类问题)。
3485580a
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| repositories | ||
| routers | ||
| services | ||
| __init__.py | ||
| config.py | ||
| db.py | ||
| dependencies.py | ||
| main.py | ||
| models.py | ||
| security.py |