X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiLsSearch.pm;h=0193e590b8b06c202d4034330e3eaf24e79e2344;hb=refs%2Fheads%2Fmaster;hp=2aa457c05707c60f1b503c8abb581023c3e5457a;hpb=2018db2a23ab1d949c757c264534f39dba338ccb;p=public-inbox.git diff --git a/lib/PublicInbox/LeiLsSearch.pm b/lib/PublicInbox/LeiLsSearch.pm index 2aa457c0..0193e590 100644 --- a/lib/PublicInbox/LeiLsSearch.pm +++ b/lib/PublicInbox/LeiLsSearch.pm @@ -29,7 +29,7 @@ sub do_ls_search_long { my @x = sort(grep(/\A\Q$pfx/, PublicInbox::LeiSavedSearch::list($lei))); while (my $x = shift @x) { $ORS = '' if !scalar(@x); - my $lss = PublicInbox::LeiSavedSearch->new($lei, $x) or next; + my $lss = PublicInbox::LeiSavedSearch->up($lei, $x) or next; my $cfg = $lss->{-cfg}; my $ent = { q => $cfg->get_all('lei.q'), @@ -71,12 +71,12 @@ sub do_ls_search_long { sub bg_worker ($$$) { my ($lei, $pfx, $json) = @_; - my $self = bless { -wq_nr_workers => 1, json => $json }, __PACKAGE__; - my ($op_c, $ops) = $lei->workers_start($self, 'ls-search', 1); - $lei->{lsss} = $self; + my $self = bless { json => $json }, __PACKAGE__; + my ($op_c, $ops) = $lei->workers_start($self, 1); + $lei->{wq1} = $self; $self->wq_io_do('do_ls_search_long', [], $pfx); - $self->wq_close(1); - $op_c->op_wait_event($ops); + $self->wq_close; + $lei->wait_wq_events($op_c, $ops); } sub lei_ls_search {