feat(shipping-notice): 新增通用解析能力,优化性能并清理遗留废弃代码

This commit is contained in:
hugo committed 2026-08-23 00:27:18 +08:00
1 parent 935bf26fa6
commit 7cfd5d167e
230 files changed
+9337 -10989

No files matched your search

-19
View File
@@ -30,25 +30,6 @@ class Job(Base):
Index('ix_jobs_business_ref', 'domain', 'job_type', 'business_ref'),
Index('ix_jobs_locked_at', 'locked_at'),
Index('ix_jobs_retry_of_job_id', 'retry_of_job_id'),
# P0-3:同一 Task 同时只允许一个正式 AutoProgress 决策 Job。库存源 RPA
# Attempt 不使用该索引,因此可以按 source 并行执行。
Index(
'uq_jobs_shipping_auto_progress_one_active_task',
'task_id',
unique=True,
postgresql_where=text(
"domain = 'shipping_notice' "
"AND job_type = 'shipping_auto_progress' "
"AND status IN ('queued', 'running') "
"AND task_id IS NOT NULL"
),
sqlite_where=text(
"domain = 'shipping_notice' "
"AND job_type = 'shipping_auto_progress' "
"AND status IN ('queued', 'running') "
"AND task_id IS NOT NULL"
),
),
# 仅预解析 Job:同业务锚点同时只允许一条 queued
# (不含 running:retry 可在旧 running 残留时另建 queued;RUN 复查也不受限)
Index(