From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/6] lei <q|up>: combine written/results into one line
Date: Sun, 2 May 2021 06:05:37 +0000 [thread overview]
Message-ID: <20210502060542.11598-2-e@80x24.org> (raw)
In-Reply-To: <20210502060542.11598-1-e@80x24.org>
Having multiple lines of output mean they can be interleaved in
daemon mode. Put stats into one line to reduce screen
real-estate size and improve readability.
---
lib/PublicInbox/LeiXSearch.pm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index d212a732..21b15025 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -359,9 +359,8 @@ sub query_done { # EOF callback for main daemon
}
my $wait = $lei->{sto} ? $lei->{sto}->ipc_do('done') : undef;
$lei->{ovv}->ovv_end($lei);
- my (@out, $start_mua);
+ my $start_mua;
if ($l2m) { # close() calls LeiToMail reap_compress
- @out = (" in $lei->{ovv}->{dst}");
if (my $out = delete $lei->{old_1}) {
if (my $mbout = $lei->{1}) {
close($mbout) or return $lei->fail(<<"");
@@ -379,9 +378,11 @@ Error closing $lei->{ovv}->{dst}: $!
}
}
if ($lei->{-progress}) {
- $lei->qerr('# ', $lei->{-mset_total} // 0, " matches", @out);
+ my $tot = $lei->{-mset_total} // 0;
my $nr = $lei->{-nr_write} // 0;
- $lei->qerr("# $nr written to $lei->{ovv}->{dst}") if $l2m;
+ $lei->qerr($l2m ?
+ "# $nr written to $lei->{ovv}->{dst} ($tot matches)" :
+ "# $tot matches");
}
$lei->start_mua if $start_mua;
$lei->dclose;
next prev parent reply other threads:[~2021-05-02 6:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 6:05 [PATCH 0/6] lei: more steps towards kw sync Eric Wong
2021-05-02 6:05 ` Eric Wong [this message]
2021-05-02 6:05 ` [PATCH 2/6] lei_input: common net_merge_all_done for lei <import|tag> Eric Wong
2021-05-02 6:05 ` [PATCH 3/6] lei_input: reject --mail-sync if using HTTP(S) for now Eric Wong
2021-05-02 6:05 ` [PATCH 4/6] lei: simplify workers_start API Eric Wong
2021-05-02 6:05 ` [PATCH 5/6] net_writer: use "FLAGS.SILENT" to set keywords Eric Wong
2021-05-02 6:05 ` [PATCH 6/6] lei <q|up>: writes to Maildirs and IMAP use mail-sync Eric Wong
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
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210502060542.11598-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).