Add more logging to backfilling guix_revision_package_derivation_distribution_counts
This commit is contained in:
parent
b79c7e83be
commit
4d0813c331
1 changed files with 29 additions and 18 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
#:use-module (ice-9 threads)
|
#:use-module (ice-9 threads)
|
||||||
#:use-module (squee)
|
#:use-module (squee)
|
||||||
#:use-module (guix-data-service database)
|
#:use-module (guix-data-service database)
|
||||||
|
#:use-module (guix-data-service utils)
|
||||||
#:use-module (guix-data-service model system)
|
#:use-module (guix-data-service model system)
|
||||||
#:export (insert-guix-revision-package-derivations
|
#:export (insert-guix-revision-package-derivations
|
||||||
|
|
||||||
|
|
@ -174,7 +175,16 @@ ORDER BY id DESC")))
|
||||||
|
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (revision-id)
|
(lambda (revision-id)
|
||||||
(simple-format #t "backfilling guix_revision_package_derivation_distribution_counts for revision ~A\n" revision-id)
|
(with-exception-handler
|
||||||
|
(lambda (exn)
|
||||||
|
(simple-format
|
||||||
|
#t "exception backfilling guix_revision_package_derivation_distribution_counts for revision ~A: ~A\n"
|
||||||
|
revision-id exn))
|
||||||
|
(lambda ()
|
||||||
|
(with-time-logging
|
||||||
|
(simple-format
|
||||||
|
#f "backfilling guix_revision_package_derivation_distribution_counts for revision ~A"
|
||||||
|
revision-id)
|
||||||
(let ((system-ids-and-targets
|
(let ((system-ids-and-targets
|
||||||
(exec-query
|
(exec-query
|
||||||
conn
|
conn
|
||||||
|
|
@ -197,7 +207,8 @@ WHERE revision_id = $1"
|
||||||
revision-id
|
revision-id
|
||||||
system-id
|
system-id
|
||||||
target)))
|
target)))
|
||||||
system-ids-and-targets)))))
|
system-ids-and-targets))))))
|
||||||
|
#:unwind? #t))
|
||||||
revision-ids))
|
revision-ids))
|
||||||
|
|
||||||
(define* (get-sql-to-select-package-and-related-derivations-for-revision
|
(define* (get-sql-to-select-package-and-related-derivations-for-revision
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue