feat(shipping-notice): 完成货代发货通知全门禁恢复MVP收口
完成全门禁恢复MVP版本交付:调整自动上传与重试配置,重构正式执行链路;修复多处代码bug,新增测试与审计工具;更新全流程文档与契约规范。
This commit is contained in:
1 parent
8e0bbf7a81
commit
c94d173f92
181 files changed
+12947
-1724
No files matched your search
@@ -95,6 +95,14 @@ def run_forever(
|
||||
handler(ctx, job.get('payload') or {})
|
||||
except Exception as exc:
|
||||
ctx.logger.exception('Handler failed job_id=%s', job.get('id'))
|
||||
# Handler 可能在 flush/写库失败后留下 aborted transaction;先回滚,
|
||||
# 再查询并收口 Job,否则 mark_failed 自身会被 InFailedSqlTransaction 阻断。
|
||||
try:
|
||||
from app import db
|
||||
|
||||
db.session.rollback()
|
||||
except Exception:
|
||||
ctx.logger.exception('Session rollback failed after handler job_id=%s', job.get('id'))
|
||||
store.mark_failed(
|
||||
job['id'],
|
||||
message=str(exc),
|
||||
|
||||
Reference in new issue
Block a user