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
|
(with-time-logging
|
||||||
(simple-format #f "getting derivations for ~A" (cons system target))
|
(simple-format #f "getting derivations for ~A" (cons system target))
|
||||||
(let loop ((start-index 0))
|
(let loop ((start-index 0))
|
||||||
(let* ((count
|
(let* ((last-chunk?
|
||||||
(if (>= (+ start-index chunk-size) packages-count)
|
(>= (+ start-index chunk-size) packages-count))
|
||||||
|
(count
|
||||||
|
(if last-chunk?
|
||||||
(- packages-count start-index)
|
(- packages-count start-index)
|
||||||
chunk-size))
|
chunk-size))
|
||||||
(chunk
|
(chunk
|
||||||
|
|
@ -1963,7 +1965,7 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
||||||
(vector-copy! derivations-vector
|
(vector-copy! derivations-vector
|
||||||
start-index
|
start-index
|
||||||
chunk)
|
chunk)
|
||||||
(unless (>= (+ start-index chunk-size) packages-count)
|
(unless last-chunk?
|
||||||
(loop (+ start-index chunk-size))))))
|
(loop (+ start-index chunk-size))))))
|
||||||
derivations-vector))
|
derivations-vector))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue