mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 10:12:18 +00:00
populate id and deadline to dead queue
This commit is contained in:
parent
f29e7b3af9
commit
d59a5f4c62
2 changed files with 6 additions and 3 deletions
|
|
@ -564,9 +564,9 @@ func (s *SqliteBackend) moveToDeadQueue(ctx context.Context, j *jobs.Job, jobErr
|
|||
return
|
||||
}
|
||||
|
||||
_, err = s.db.ExecContext(ctx, `INSERT INTO neoq_dead_jobs(queue, fingerprint, payload, retries, max_retries, error)
|
||||
VALUES ($1, $2, $3, $4, $5, $6)`,
|
||||
j.Queue, j.Fingerprint, j.Payload2, j.Retries, j.MaxRetries, jobErr)
|
||||
_, err = s.db.ExecContext(ctx, `INSERT INTO neoq_dead_jobs(queue, fingerprint, payload, retries, max_retries, error, deadline)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7)`,
|
||||
j.ID, j.Queue, j.Fingerprint, j.Payload2, j.Retries, j.MaxRetries, jobErr, j.Deadline)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ func prepareAndCleanupDB(t *testing.T) (dbURL string, db *sql.DB) {
|
|||
// Delete everything in the neoq_jobs table if it exists
|
||||
_, _ = db.Exec("DELETE FROM neoq_jobs")
|
||||
|
||||
// Delete everything in the neoq_dead_jobs table if it exists
|
||||
_, _ = db.Exec("DELETE FROM neoq_dead_jobs")
|
||||
|
||||
return dbURL, db
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue