feat(jobs): persist job lifecycle to PostgreSQL job_audit

UpsertQueued/Running/MarkTerminal через SetPersistHooks; исправлен deadlock
fireEnqueued под Registry mutex.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-05-25 10:33:57 +07:00
co-authored by Cursor
parent 4a57c91e29
commit e65cf0d958
4 changed files with 106 additions and 15 deletions
+3
View File
@@ -95,6 +95,9 @@ func (w *Worker) Process(j *Job) {
return
}
j.MarkRunning()
if w != nil && w.Registry != nil {
w.Registry.fireRunning(j)
}
if j.IsCancelRequested() {
j.MarkCancelled()
return