From c2e60999aafbe450b14b0909112965c4b4a7ac00 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 2 May 2021 06:05:37 +0000 Subject: lei : combine written/results into one line 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(-) (limited to 'lib/PublicInbox/LeiXSearch.pm') 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; -- cgit v1.2.3-24-ge0c7