]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiQuery.pm
lei: improve management around short-lived workers
[public-inbox.git] / lib / PublicInbox / LeiQuery.pm
index 007e35fc41cf061b4ce963afc0ba99e0fda37d94..84996e7e2f4b4e3d8985917f224eb56a67824eff 100644 (file)
@@ -50,17 +50,13 @@ sub lei_q {
        # --local is enabled by default unless --only is used
        # we'll allow "--only $LOCATION --local"
        my $sto = $self->_lei_store(1);
-       my $lse = $sto->search;
        if (($opt->{'import-remote'} //= 1) |
                        (($opt->{'import-before'} //= \1) ? 1 : 0)) {
                $sto->write_prepare($self);
        }
+       my $lse = $sto->search;
        if ($opt->{'local'} //= scalar(@only) ? 0 : 1) {
                $lxs->prepare_external($lse);
-       } else {
-               my $tmp = PublicInbox::LeiXSearch->new;
-               $tmp->prepare_external($lse);
-               $self->ale->refresh_externals($tmp);
        }
        if (@only) {
                for my $loc (@only) {