Populate the narinfo_fetch_records table
This commit is contained in:
parent
0291bda98a
commit
eb2ba599d9
2 changed files with 12 additions and 2 deletions
|
|
@ -232,4 +232,5 @@ LIMIT 15000"))
|
|||
(lambda (conn)
|
||||
(record-narinfo-details-and-return-ids
|
||||
conn
|
||||
build-server-id
|
||||
narinfos))))))
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue