feat(monitor): 死信中文提示与成功/取消自动退信

This commit is contained in:
姚章浩
2026-09-15 14:37:46 +08:00
parent f8cef26f4a
commit 767684bb1f
11 changed files with 147 additions and 16 deletions
+10
View File
@@ -64,6 +64,16 @@ WHERE id = $1
AND state = 'running'
`
// retireOpenFailuresSQL keeps the dead-letter lane honest: once the job
// itself succeeded, its terminal-attempt projection is no longer waiting on
// a human (a later automatic retry recovered it).
const retireOpenFailuresSQL = `
UPDATE job_failures
SET state = 'requeued', resolved_at = $2, resolution_actor_ref = 'system:queue',
resolution_reason = '任务后续重试成功'
WHERE job_id = $1 AND state = 'open'
`
const heartbeatJobSQL = `
UPDATE jobs
SET lease_until = $4,