From: Christopher Baines <mail@cbaines.net>
To: 45146@debbugs.gnu.org
Subject: [bug#45146] [PATCH 2/2] weather: Call lookup-narinfos with a custom progress reporter.
Date: Wed, 24 Feb 2021 20:34:12 +0000 [thread overview]
Message-ID: <20210224203412.15135-2-mail@cbaines.net> (raw)
In-Reply-To: <20210224203412.15135-1-mail@cbaines.net>
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.
---
guix/scripts/weather.scm | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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))
--
2.30.0
prev parent reply other threads:[~2021-02-24 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 18:57 [bug#45146] [PATCH] scripts: substitute: Improve fetch-narinfos progress reporting Christopher Baines
2020-12-11 18:01 ` Ludovic Courtès
2020-12-24 17:26 ` Christopher Baines
2021-02-24 20:44 ` Christopher Baines
2021-03-09 20:29 ` bug#45146: " Christopher Baines
2021-02-24 20:34 ` [bug#45146] [PATCH 1/2] guix: substitutes: Make progress reporting configurable Christopher Baines
2021-02-24 20:34 ` Christopher Baines [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210224203412.15135-2-mail@cbaines.net \
--to=mail@cbaines.net \
--cc=45146@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.