]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiConvert.pm
lei + ipc: simplify process reaping
[public-inbox.git] / lib / PublicInbox / LeiConvert.pm
index 5b27ec2d4dc7bbfbae4ea75e6ddba762c7d9fa47..68fc7c0ba2b0b2932784e5d00bb7602e896a2071 100644 (file)
@@ -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
@@ -55,11 +55,11 @@ sub lei_convert { # the main "lei convert" method
        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);
+       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 {