Add a #:loop? option to backfill-derivation-source-file-nars
This commit is contained in:
parent
4ed14007c4
commit
d107830300
1 changed files with 4 additions and 2 deletions
|
|
@ -1066,7 +1066,9 @@ INSERT INTO derivation_source_file_nars (
|
||||||
(number->string uncompressed-size)
|
(number->string uncompressed-size)
|
||||||
(string-append "\\x" data-string))))))
|
(string-append "\\x" data-string))))))
|
||||||
|
|
||||||
(define* (backfill-derivation-source-file-nars conn #:key (batch-size 10000))
|
(define* (backfill-derivation-source-file-nars conn #:key
|
||||||
|
(batch-size 10000)
|
||||||
|
(loop? #t))
|
||||||
(define (missing-batch)
|
(define (missing-batch)
|
||||||
(exec-query
|
(exec-query
|
||||||
conn
|
conn
|
||||||
|
|
@ -1092,7 +1094,7 @@ LIMIT $1"
|
||||||
(simple-format #t "inserting ~A\n" source-file))
|
(simple-format #t "inserting ~A\n" source-file))
|
||||||
(simple-format #t "missing ~A\n" source-file))))
|
(simple-format #t "missing ~A\n" source-file))))
|
||||||
batch)
|
batch)
|
||||||
(loop (missing-batch)))))
|
(when loop? (loop (missing-batch))))))
|
||||||
|
|
||||||
(define (insert-missing-derivations conn
|
(define (insert-missing-derivations conn
|
||||||
derivation-ids-hash-table
|
derivation-ids-hash-table
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue