Refactor
This commit is contained in:
parent
ed6a4b1577
commit
cee8868bfd
1 changed files with 5 additions and 3 deletions
|
|
@ -1944,8 +1944,10 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
(with-time-logging
|
||||
(simple-format #f "getting derivations for ~A" (cons system target))
|
||||
(let loop ((start-index 0))
|
||||
(let* ((count
|
||||
(if (>= (+ start-index chunk-size) packages-count)
|
||||
(let* ((last-chunk?
|
||||
(>= (+ start-index chunk-size) packages-count))
|
||||
(count
|
||||
(if last-chunk?
|
||||
(- packages-count start-index)
|
||||
chunk-size))
|
||||
(chunk
|
||||
|
|
@ -1963,7 +1965,7 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
(vector-copy! derivations-vector
|
||||
start-index
|
||||
chunk)
|
||||
(unless (>= (+ start-index chunk-size) packages-count)
|
||||
(unless last-chunk?
|
||||
(loop (+ start-index chunk-size))))))
|
||||
derivations-vector))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue