]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_xsearch: show --output location with match count
authorEric Wong <e@80x24.org>
Sat, 24 Apr 2021 23:15:26 +0000 (19:15 -0400)
committerEric Wong <e@80x24.org>
Sun, 25 Apr 2021 19:22:24 +0000 (15:22 -0400)
This makes "lei up --all=local" output easier-to-understand
when it's updating multiple saved searches.

lib/PublicInbox/LeiXSearch.pm

index e15383915283715987b97d118066f64517b52f7c..018b60f965648fb93025a99ef6a2af0d1956bdb2 100644 (file)
@@ -354,7 +354,9 @@ 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;
        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(<<"");
@@ -372,7 +374,7 @@ Error closing $lei->{ovv}->{dst}: $!
                }
        }
        $lei->{-progress} and
-               $lei->err('# ', $lei->{-mset_total} // 0, " matches");
+               $lei->err('# ', $lei->{-mset_total} // 0, " matches", @out);
        $lei->dclose;
 }