]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extindex: set {current_info} in eidxq processing
authorEric Wong <e@80x24.org>
Wed, 13 Oct 2021 07:00:37 +0000 (07:00 +0000)
committerEric Wong <e@80x24.org>
Wed, 13 Oct 2021 19:51:20 +0000 (19:51 +0000)
This gives context as to where warnings are coming from.

lib/PublicInbox/ExtSearchIdx.pm

index ddb16241e23d029a458ccd3a38a9c8bac2bbebfc..750ced5c0f453bc8e0241a1ea2e6603a64c00104 100644 (file)
@@ -754,9 +754,8 @@ sub prep_id2pos ($) {
 
 sub eidxq_process ($$) { # for reindexing
        my ($self, $sync) = @_;
-       return unless $self->{cfg};
-
-       return unless eidxq_lock_acquire($self);
+       local $self->{current_info} = 'eidxq process';
+       return unless ($self->{cfg} && eidxq_lock_acquire($self));
        my $dbh = $self->{oidx}->dbh;
        my $tot = $dbh->selectrow_array('SELECT COUNT(*) FROM eidxq') or return;
        ${$sync->{nr}} = 0;