about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiQuery.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-24 04:46:47 -0700
committerEric Wong <e@80x24.org>2021-01-24 15:45:20 -0400
commit0ca8bd671784ffd1a4ed59914e0b9a0bef7c0ea5 (patch)
treedc7955d386ad6bf54f8cfd919ab1880441fa729e /lib/PublicInbox/LeiQuery.pm
parentcea37260f3d63a4e497f0e5803d2a40c6f89dc0d (diff)
downloadpublic-inbox-0ca8bd671784ffd1a4ed59914e0b9a0bef7c0ea5.tar.gz
Unfortunately, this isn't a per-host limit, yet; but
nevertheless reduces load on existing PublicInbox::WWW
instances, since requesting a mboxrd is one of the more
expensive operations.
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r--lib/PublicInbox/LeiQuery.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index acab3c2c..a7938e8b 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -26,7 +26,7 @@ sub lei_q {
                 my $cb = $lxs->can('prepare_external');
                 $self->_externals_each($cb, $lxs);
         }
-        my $xj = $opt->{thread} ? $lxs->locals : ($lxs->remotes + 1);
+        my $xj = $lxs->concurrency($opt);
         my $ovv = PublicInbox::LeiOverview->new($self) or return;
         $self->atfork_prepare_wq($lxs);
         $lxs->wq_workers_start('lei_xsearch', $xj, $self->oldset);