Record jobs as failed when they are killed
So that they aren't retried again and again.
This commit is contained in:
parent
3dfa9212f1
commit
6904547bf2
2 changed files with 30 additions and 2 deletions
|
|
@ -24,10 +24,13 @@
|
|||
#:use-module (guix-data-service model package-metadata)
|
||||
#:use-module (guix-data-service model derivation)
|
||||
#:export (log-for-job
|
||||
count-log-parts
|
||||
combine-log-parts!
|
||||
fetch-unlocked-jobs
|
||||
process-load-new-guix-revision-job
|
||||
select-job-for-commit
|
||||
select-jobs-and-events
|
||||
record-job-event
|
||||
enqueue-load-new-guix-revision-job
|
||||
most-recent-n-load-new-guix-revision-jobs))
|
||||
|
||||
|
|
@ -122,6 +125,17 @@
|
|||
($1, NULL) ON CONFLICT DO NOTHING"
|
||||
(list job-id)))
|
||||
|
||||
(define (count-log-parts conn job-id)
|
||||
(match (exec-query
|
||||
conn
|
||||
"
|
||||
SELECT COUNT(*)
|
||||
FROM load_new_guix_revision_job_log_parts
|
||||
WHERE job_id = $1"
|
||||
(list job-id))
|
||||
(((id))
|
||||
(string->number id))))
|
||||
|
||||
(define (combine-log-parts! conn job-id)
|
||||
(with-postgresql-transaction
|
||||
conn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue