]> Sergey Matveev's repositories - public-inbox.git/commitdiff
admin: progress shows the inbox being indexed
authorEric Wong <e@yhbt.net>
Thu, 20 Aug 2020 20:24:36 +0000 (20:24 +0000)
committerEric Wong <e@yhbt.net>
Thu, 20 Aug 2020 21:08:27 +0000 (21:08 +0000)
This is helpful with --all, or when multiple inboxes
are being indexed.

lib/PublicInbox/Admin.pm

index d99a00b4b471d5983d38c7bd3150ebf0d03928b0..f5427af77376a6e1da40f5fe9aa187c19a53f36e 100644 (file)
@@ -207,6 +207,9 @@ sub index_terminate {
 sub index_inbox {
        my ($ibx, $im, $opt) = @_;
        my $jobs = delete $opt->{jobs} if $opt;
+       if (my $pr = $opt->{-progress}) {
+               $pr->("indexing $ibx->{inboxdir} ...\n");
+       }
        local %SIG = %SIG;
        setup_signals(\&index_terminate, $ibx);
        if (ref($ibx) && $ibx->version == 2) {