diff options
author | Christopher Baines <mail@cbaines.net> | 2021-02-24 19:28:05 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-03-09 20:05:02 +0000 |
commit | 030b746b454c122e2875c3f3c82acc0e7e1ea823 (patch) | |
tree | 490e5bf57f53ec1c36fc5d9acb03f956a73b9531 | |
parent | db96492af23afbaacfc1fe3117a58c306df79e7d (diff) | |
download | guix-improve-guix-weather-progress-reporting.tar guix-improve-guix-weather-progress-reporting.tar.gz |
weather: Call lookup-narinfos with a custom progress reporter.improve-guix-weather-progress-reporting
This means there's a useful progress bar when running guix weather.
* guix/scripts/weather.scm (report-server-coverage): Pass
#:make-progress-reporter to lookup-narinfos.
-rw-r--r-- | guix/scripts/weather.scm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 9e94bff5a3..26ec543211 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -181,7 +181,11 @@ Return the coverage ratio, an exact number between 0 and 1." (format #t (G_ "looking for ~h store items on ~a...~%") (length items) server) - (let/time ((time narinfos (lookup-narinfos server items))) + (let/time ((time narinfos (lookup-narinfos + server items + #:make-progress-reporter + (lambda* (total #:key url #:allow-other-keys) + (progress-reporter/bar total))))) (format #t "~a~%" server) (let ((obtained (length narinfos)) (requested (length items)) |