aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-07-09 18:43:21 +0100
committerChristopher Baines <mail@cbaines.net>2019-07-09 18:43:21 +0100
commit502dc93618eacdd66503d846e419de4be635cd4e (patch)
treeedf2bfa30ab4cc89da2a92bdcf737422eb8cdcb3
parentf2d28b4def998d8cce0659deafe77d431c9d546f (diff)
downloaddata-service-502dc93618eacdd66503d846e419de4be635cd4e.tar
data-service-502dc93618eacdd66503d846e419de4be635cd4e.tar.gz
Fix issue inserting the empty log row
If the job started, and then was restarted, the row will already exist. So don't error on a conflict.
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index 2b4182e..07baf1b 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -118,7 +118,7 @@
(exec-query
conn
"INSERT INTO load_new_guix_revision_job_logs (job_id, contents) VALUES
-($1, NULL)"
+($1, NULL) ON CONFLICT DO NOTHING"
(list job-id)))
(define (combine-log-parts! conn job-id)