X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiRm.pm;h=62423ac9828e7c2ec851f36de0161c08cd2fbaf3;hb=0054246c2d03fcc91bc899da5ef41a68f505e542;hp=3371f3ed00e469f66233567ff50c782532514a92;hpb=7b7939d47b336fb7d8c4387858e620dbc218bb1e;p=public-inbox.git diff --git a/lib/PublicInbox/LeiRm.pm b/lib/PublicInbox/LeiRm.pm index 3371f3ed..62423ac9 100644 --- a/lib/PublicInbox/LeiRm.pm +++ b/lib/PublicInbox/LeiRm.pm @@ -10,22 +10,7 @@ use parent qw(PublicInbox::IPC PublicInbox::LeiInput); sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh my ($self, $eml) = @_; - $self->{lei}->{sto}->ipc_do('remove_eml', $eml); -} - -sub input_mbox_cb { # MboxReader callback - my ($eml, $self) = @_; - input_eml_cb($self, $eml); -} - -sub input_net_cb { # callback for ->imap_each, ->nntp_each - my (undef, undef, $kw, $eml, $self) = @_; # @_[0,1]: url + uid ignored - input_eml_cb($self, $eml); -} - -sub input_maildir_cb { - my (undef, $kw, $eml, $self) = @_; # $_[0] $filename ignored - input_eml_cb($self, $eml); + $self->{lei}->{sto}->wq_do('remove_eml', $eml); } sub lei_rm { @@ -34,11 +19,8 @@ sub lei_rm { $lei->{opt}->{'in-format'} //= 'eml'; my $self = bless {}, __PACKAGE__; $self->prepare_inputs($lei, \@inputs) or return; - my ($op_c, $ops) = $lei->workers_start($self, 1); - $lei->{wq1} = $self; $lei->{-err_type} = 'non-fatal'; - net_merge_all_done($self) unless $lei->{auth}; - $lei->wait_wq_events($op_c, $ops); + $lei->wq1_start($self); } no warnings 'once';