]> 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 148e8524d6d97b716885ba8e0eff59d693b14225..84996e7e2f4b4e3d8985917f224eb56a67824eff 100644 (file)
@@ -50,11 +50,11 @@ 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);
        }