X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiQuery.pm;h=d6e801e328aa410582b3235a91ebbb646212d362;hb=51191d611e918ff3ef6e9ce8ee52ba7b2cd2144c;hp=a80d58876070492c2708f0a2c39afc6e866b2856;hpb=21671ed82f8d1a7b6de593e073079e29c5675aa8;p=public-inbox.git diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index a80d5887..d6e801e3 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -41,11 +41,17 @@ sub lei_q { $j = 1 if !$opt->{thread}; $j++ if $opt->{'local'}; # for sto->search below $self->atfork_prepare_wq($lxs); - $lxs->wq_workers_start('lei_xsearch', $j, $self->oldset) - // $lxs->wq_workers($j); + $lxs->wq_workers_start('lei_xsearch', $j, $self->oldset); + $self->{lxs} = $lxs; - # no forking workers after this my $ovv = PublicInbox::LeiOverview->new($self) or return; + if (my $l2m = $self->{l2m}) { + $j = 4 if $j <= 4; # TODO configurable + $self->atfork_prepare_wq($l2m); + $l2m->wq_workers_start('lei2mail', $j, $self->oldset); + } + + # no forking workers after this my $sto = $self->_lei_store(1); unshift(@srcs, $sto->search) if $opt->{'local'}; my %mset_opt = map { $_ => $opt->{$_} } qw(thread limit offset);