Parallelise inserting package derivation distribution counts
This commit is contained in:
parent
885a4758d3
commit
7869082816
2 changed files with 51 additions and 37 deletions
|
|
@ -1856,8 +1856,9 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
(loop (catch #t
|
||||
(lambda ()
|
||||
(stat:size (stat "/var/guix/db/db.sqlite-wal")))
|
||||
(lambda _ 0)))))
|
||||
(lambda _ 0))))))
|
||||
|
||||
(define (process-system-and-target system target)
|
||||
(with-time-logging
|
||||
(simple-format #f "processing derivations for ~A" (cons system target))
|
||||
(let ((derivations-vector (make-vector packages-count)))
|
||||
|
|
@ -1913,7 +1914,18 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
guix-revision-id
|
||||
package-derivation-ids-chunk)))
|
||||
2000
|
||||
package-derivation-ids))))))
|
||||
package-derivation-ids)))))
|
||||
|
||||
(with-resource-from-pool postgresql-connection-pool conn
|
||||
(with-time-logging
|
||||
(simple-format
|
||||
#f "insert-guix-revision-package-derivation-distribution-counts (~A ~A)"
|
||||
system target)
|
||||
(insert-guix-revision-package-derivation-distribution-counts
|
||||
conn
|
||||
guix-revision-id
|
||||
system
|
||||
(or target "")))))
|
||||
|
||||
(let ((process-system-and-target/fiberized
|
||||
(fiberize process-system-and-target
|
||||
|
|
@ -1925,14 +1937,7 @@ SELECT 1 FROM derivation_source_file_nars WHERE derivation_source_file_id = $1"
|
|||
(with-resource-from-pool inf-and-store-pool res
|
||||
(match res
|
||||
((inferior . inferior-store)
|
||||
(inferior-fetch-system-target-pairs inferior))))))
|
||||
|
||||
(with-resource-from-pool postgresql-connection-pool conn
|
||||
(with-time-logging
|
||||
"insert-guix-revision-package-derivation-distribution-counts"
|
||||
(insert-guix-revision-package-derivation-distribution-counts
|
||||
conn
|
||||
guix-revision-id))))
|
||||
(inferior-fetch-system-target-pairs inferior)))))))
|
||||
|
||||
(define (extract-and-store-system-tests)
|
||||
(if skip-system-tests?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue