aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service/model/nar.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-12-05 16:11:52 +0100
committerChristopher Baines <mail@cbaines.net>2019-12-12 20:07:22 +0000
commiteb2ba599d94d28fe421a262a2ffbf7528d367aa4 (patch)
tree9a8abbe0c1f1a20175b028e8e062b9dc30e96bf9 /guix-data-service/model/nar.scm
parent0291bda98abf4cf4299434ed304aa72846f405dd (diff)
downloaddata-service-eb2ba599d94d28fe421a262a2ffbf7528d367aa4.tar
data-service-eb2ba599d94d28fe421a262a2ffbf7528d367aa4.tar.gz
Populate the narinfo_fetch_records table
Diffstat (limited to 'guix-data-service/model/nar.scm')
-rw-r--r--guix-data-service/model/nar.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/guix-data-service/model/nar.scm b/guix-data-service/model/nar.scm
index 92c4d11..d3a524e 100644
--- a/guix-data-service/model/nar.scm
+++ b/guix-data-service/model/nar.scm
@@ -18,7 +18,7 @@
(define narinfo-contents
(@@ (guix scripts substitute) narinfo-contents))
-(define (record-narinfo-details-and-return-ids conn narinfos)
+(define (record-narinfo-details-and-return-ids conn build-server-id narinfos)
(define data
(map (lambda (narinfo)
(match (string-split
@@ -106,7 +106,16 @@ VALUES "
nar-id
narinfo-signature-data-id)
"
-ON CONFLICT DO NOTHING"))))
+ON CONFLICT DO NOTHING"))
+
+ (exec-query
+ conn
+ (string-append
+ "
+INSERT INTO narinfo_fetch_records (narinfo_signature_data_id, build_server_id)
+VALUES ($1, $2)")
+ (list (number->string narinfo-signature-data-id)
+ (number->string build-server-id)))))
nar-ids
narinfos)