Clear the previous log entry when starting a job

This commit is contained in:
Christopher Baines 2019-08-04 09:42:21 +01:00
parent 84197686ce
commit 002ae7685c

View file

@ -120,10 +120,14 @@
contents)))))
(define (insert-empty-log-entry conn job-id)
(exec-query
conn
"DELETE FROM load_new_guix_revision_job_logs WHERE job_id = $1"
(list job-id))
(exec-query
conn
"INSERT INTO load_new_guix_revision_job_logs (job_id, contents) VALUES
($1, NULL) ON CONFLICT DO NOTHING"
($1, NULL)"
(list job-id)))
(define (count-log-parts conn job-id)