From 568d0e1b0866a45e95440d17b6e8f1740cc23e3f Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Mon, 9 Jan 2017 01:29:48 +0100 Subject: [PATCH] database: db-add-derivation: Don't try to add a derivation twice. * src/cuirass/database.scm (db-add-derivation): Ignore if JOB is already present in DB. --- src/cuirass/database.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index 870cdc0..702e643 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -147,7 +147,7 @@ INSERT OR IGNORE INTO Specifications (repo_name, url, load_path, file, \ (define (db-add-derivation db job) "Store a derivation result in database DB and return its ID." (sqlite-exec db "\ -INSERT INTO Derivations (derivation, job_name, evaluation)\ +INSERT OR IGNORE INTO Derivations (derivation, job_name, evaluation)\ VALUES ('~A', '~A', '~A');" (assq-ref job #:derivation) (assq-ref job #:job-name) -- 2.11.0