diff options
author | Christopher Baines <mail@cbaines.net> | 2019-12-05 16:11:52 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-12-12 20:07:22 +0000 |
commit | eb2ba599d94d28fe421a262a2ffbf7528d367aa4 (patch) | |
tree | 9a8abbe0c1f1a20175b028e8e062b9dc30e96bf9 /guix-data-service/model/nar.scm | |
parent | 0291bda98abf4cf4299434ed304aa72846f405dd (diff) | |
download | data-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.scm | 13 |
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) |