diff options
author | Christopher Baines <mail@cbaines.net> | 2020-01-03 21:42:52 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-01-03 21:42:52 +0000 |
commit | d107830300532ab0d57593ca12b4554acbed888c (patch) | |
tree | 739793152643239de0cf4d47e7117c62c9f634c5 /guix-data-service/model | |
parent | 4ed14007c44f55869d30358b6da2235069dfcaf9 (diff) | |
download | data-service-d107830300532ab0d57593ca12b4554acbed888c.tar data-service-d107830300532ab0d57593ca12b4554acbed888c.tar.gz |
Add a #:loop? option to backfill-derivation-source-file-nars
Diffstat (limited to 'guix-data-service/model')
-rw-r--r-- | guix-data-service/model/derivation.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/guix-data-service/model/derivation.scm b/guix-data-service/model/derivation.scm index 29a1ce7..d2ed2fa 100644 --- a/guix-data-service/model/derivation.scm +++ b/guix-data-service/model/derivation.scm @@ -1066,7 +1066,9 @@ INSERT INTO derivation_source_file_nars ( (number->string uncompressed-size) (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) (exec-query conn @@ -1092,7 +1094,7 @@ LIMIT $1" (simple-format #t "inserting ~A\n" source-file)) (simple-format #t "missing ~A\n" source-file)))) batch) - (loop (missing-batch))))) + (when loop? (loop (missing-batch)))))) (define (insert-missing-derivations conn derivation-ids-hash-table |