X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiConvert.pm;h=623599aef883b7cb15b8f63264d23bc157c5da57;hb=fa2df786060c55578c15295f01d47827f9246b34;hp=5b27ec2d4dc7bbfbae4ea75e6ddba762c7d9fa47;hpb=6dbc443f8acfb262ca1ab263b60ecb801c00aac2;p=public-inbox.git diff --git a/lib/PublicInbox/LeiConvert.pm b/lib/PublicInbox/LeiConvert.pm index 5b27ec2d..623599ae 100644 --- a/lib/PublicInbox/LeiConvert.pm +++ b/lib/PublicInbox/LeiConvert.pm @@ -41,7 +41,7 @@ sub process_inputs { # via wq_do delete $lei->{1}; delete $self->{wcb}; # commit my $nr = delete($lei->{-nr_write}) // 0; - $lei->err("# converted $nr messages") if $lei->{opt}->{verbose}; + $lei->qerr("# converted $nr messages"); } sub lei_convert { # the main "lei convert" method @@ -51,15 +51,16 @@ sub lei_convert { # the main "lei convert" method my $self = bless {}, __PACKAGE__; my $ovv = PublicInbox::LeiOverview->new($lei, 'out-format'); $lei->{l2m} or return - $lei->fail("output not specified or is not a mail destination"); + $lei->fail('--output unspecified or is not a mail destination'); my $devfd = $lei->path_to_fd($ovv->{dst}) // return; $lei->{opt}->{augment} = 1 if $devfd < 0; $self->prepare_inputs($lei, \@inputs) or return; - my ($op_c, $ops) = $lei->workers_start($self, 'lei-convert', 1); + # n.b. {net} {auth} is handled by l2m worker + my ($op_c, $ops) = $lei->workers_start($self, 1); $lei->{wq1} = $self; $self->wq_io_do('process_inputs', []); - $self->wq_close(1); - $op_c->op_wait_event($ops); + $self->wq_close; + $lei->wait_wq_events($op_c, $ops); } sub ipc_atfork_child {