]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiRm.pm
lei rm|tag: drop redundant mbox+net callbacks
[public-inbox.git] / lib / PublicInbox / LeiRm.pm
index 578e9811495080f2d620bcb52e0900db2331152c..524c178e3b471e5fba46a5f2bbd5382b065ac4b1 100644 (file)
@@ -10,17 +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);
+       $self->{lei}->{sto}->wq_do('remove_eml', $eml);
 }
 
 sub input_maildir_cb {
@@ -32,7 +22,7 @@ sub lei_rm {
        my ($lei, @inputs) = @_;
        $lei->_lei_store(1)->write_prepare($lei);
        $lei->{opt}->{'in-format'} //= 'eml';
-       my $self = bless { -wq_nr_workers => 1 }, __PACKAGE__;
+       my $self = bless {}, __PACKAGE__;
        $self->prepare_inputs($lei, \@inputs) or return;
        my ($op_c, $ops) = $lei->workers_start($self, 1);
        $lei->{wq1} = $self;
@@ -44,6 +34,5 @@ sub lei_rm {
 no warnings 'once';
 *ipc_atfork_child = \&PublicInbox::LeiInput::input_only_atfork_child;
 *net_merge_all_done = \&PublicInbox::LeiInput::input_only_net_merge_all_done;
-*net_merge_all = \&PublicInbox::LeiAuth::net_merge_all;
 
 1;