diff options
author | Eric Wong <e@80x24.org> | 2021-10-19 09:33:41 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-19 17:29:19 +0000 |
commit | bb0eab1051318528011252866b592735981084a5 (patch) | |
tree | 23ccb94338a05522bbb4186e807cae7711cd2a40 /lib/PublicInbox/LeiQuery.pm | |
parent | 01a049cadb1080698a447479de806755e9bc9342 (diff) | |
download | public-inbox-bb0eab1051318528011252866b592735981084a5.tar.gz |
These can be used to temporarily disable using certain externals in case of temporary network failure or mount point unavailability.
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r-- | lib/PublicInbox/LeiQuery.pm | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index 56b82acc..effc572f 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -95,18 +95,11 @@ sub lxs_prepare { } # --external is enabled by default, but allow --no-external if ($opt->{external} //= 1) { - my %x; - for my $loc (@{$opt->{exclude} // []}) { - my @l = $self->get_externals($loc, 1) or return; - $x{$_} = 1 for @l; - } - my $ne = $self->externals_each(\&prep_ext, $lxs, \%x); + my $ex = $self->canonicalize_excludes($opt->{exclude}); + $self->externals_each(\&prep_ext, $lxs, $ex); $opt->{remote} //= !($lxs->locals - $opt->{'local'}); - if ($opt->{'local'}) { - $lxs->{remotes} = \@iremotes if !$opt->{remote}; - } else { - $lxs->{locals} = \@ilocals; - } + $lxs->{locals} = \@ilocals if !$opt->{'local'}; + $lxs->{remotes} = \@iremotes if !$opt->{remote}; } } ($lxs->locals || $lxs->remotes) ? ($self->{lxs} = $lxs) : |