diff options
author | Eric Wong <e@80x24.org> | 2020-12-26 10:16:23 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-27 09:30:33 +0000 |
commit | 02aad3e340d1711359c4def6e91482140a989ce1 (patch) | |
tree | 31e2cc327ce5fcde466ef524bdd7b7faeea0b6f8 /lib/PublicInbox/ExtSearchIdx.pm | |
parent | 41464d205ade16a5a847061fa2eb706a33b52a88 (diff) | |
download | public-inbox-02aad3e340d1711359c4def6e91482140a989ce1.tar.gz |
This makes diagnosing --watch problems easier when there's 50K inboxes by avoiding the lengthy scan (which is the reason --watch exists in the first place).
Diffstat (limited to 'lib/PublicInbox/ExtSearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 778154a5..07e64698 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -881,9 +881,11 @@ sub eidx_sync { # main entry point } # don't use $_ here, it'll get clobbered by reindex_checkpoint - for my $ibx (@{$self->{ibx_list}}) { - last if $sync->{quit}; - sync_inbox($self, $sync, $ibx); + if ($opt->{scan} // 1) { + for my $ibx (@{$self->{ibx_list}}) { + last if $sync->{quit}; + sync_inbox($self, $sync, $ibx); + } } $self->{oidx}->rethread_done($opt) unless $sync->{quit}; eidxq_process($self, $sync) unless $sync->{quit}; |