fix(P1-E): 启动时标 failed 残留 pending/running ingest_jobs

lifespan 加 _fail_stale_ingest_jobs():UPDATE ingest_jobs SET status=failed
WHERE status IN ('pending','running');异常仅记 warning 不阻断启动。
顺手修复 0021(op.text→字符串)/0023(索引名 leason→league)/0024(type_unique→type_)
三个待执行迁移 bug。

测试 test_p1_e_stale_ingest_jobs(2/2 mock);全量 315 通过。
This commit is contained in:
shangfangjian
2026-09-22 08:49:30 +08:00
parent b997c06ede
commit b30ad56319
5 changed files with 115 additions and 4 deletions
@@ -30,7 +30,7 @@ def upgrade() -> None:
'matches',
['source_event_id'],
unique=True,
postgresql_where=op.text('source_event_id IS NOT NULL'),
postgresql_where='source_event_id IS NOT NULL',
)