feat: 完善采购任务安全恢复 (#73)

This commit is contained in:
chengma
2026-08-10 00:27:52 +08:00
parent d6339a810f
commit c86c7482d9
15 changed files with 786 additions and 12 deletions
+3 -3
View File
@@ -164,7 +164,7 @@ class PurchaseTaskService:
exc.code,
exc.message,
exc.retryable,
exc.step or step,
step,
exc.diagnostics,
)
except Exception as exc:
@@ -367,9 +367,9 @@ class PurchaseTaskService:
) -> OutboxEventRecord:
if code == "PURCHASE_CANCELLED":
status = TaskStatus.CANCELLED
elif retryable:
status = TaskStatus.RETRY_WAIT
else:
# 采购没有手动“重新执行”入口。即使错误属于
# 技术上可重试,也先留给人工判断,避免隐式重复采购。
status = TaskStatus.MANUAL_REVIEW
return self._repository.save_purchase_failure(
remote_task_id,