lib/PublicInbox/LeiTag.pm | 6 +++++- t/lei-import-imap.t | 1 + diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm index d572a84acab43e84ece12d90ff32e9fd82e5692b..06313139775446ca592ffbeeab380f16b57650b6 100644 --- a/lib/PublicInbox/LeiTag.pm +++ b/lib/PublicInbox/LeiTag.pm @@ -112,7 +112,8 @@ return $lei->fail('no keywords or labels specified'); my $ops = { '' => [ \&tag_done, $lei ] }; $lei->{auth}->op_merge($ops, $self) if $lei->{auth}; $self->{vmd_mod} = $vmd_mod; - (my $op_c, $ops) = $lei->workers_start($self, 'lei_tag', 1, $ops); + my $j = $self->{-wq_nr_workers} = 1; # locked for now + (my $op_c, $ops) = $lei->workers_start($self, 'lei_tag', $j, $ops); $lei->{tag} = $self; net_merge_complete($self) unless $lei->{auth}; $op_c->op_wait_event($ops); @@ -174,5 +175,8 @@ # don't duplicate if already 100% completed /\A$re(\Q$cur\E.*)/ ? ($cur eq $1 ? () : $1) : (); } grep(/$re\Q$cur/, @all); } + +no warnings 'once'; # the following works even when LeiAuth is lazy-loaded +*net_merge_all = \&PublicInbox::LeiAuth::net_merge_all; 1; diff --git a/t/lei-import-imap.t b/t/lei-import-imap.t index fd38037ae9c1654b47af76759df442e3559a05df..7e4d44b9d246f14dc3267cf53851002c5eaf9db8 100644 --- a/t/lei-import-imap.t +++ b/t/lei-import-imap.t @@ -23,5 +23,6 @@ is(pop @$out, undef, 'trailing JSON null element was null'); my %r; for (@$out) { $r{ref($_)}++ } is_deeply(\%r, { 'HASH' => scalar(@$out) }, 'all hashes'); + lei_ok([qw(tag +kw:seen), "imap://$host_port/t.v2.0"], undef, undef); }); done_testing;