lib/PublicInbox/LeiImport.pm | 7 +------ lib/PublicInbox/LeiInput.pm | 7 +++++++ lib/PublicInbox/LeiTag.pm | 7 +------ diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm index 575cf125803cd63dbc4a048535d0184334550782..394138b49c41be27af34fe9078aca180be5805f4 100644 --- a/lib/PublicInbox/LeiImport.pm +++ b/lib/PublicInbox/LeiImport.pm @@ -48,12 +48,6 @@ $vmd->{sync_info} = [ $url, $uid ] if $self->{-mail_sync}; input_eml_cb($self, $eml, $vmd); } -sub net_merge_all_done { # callback used by LeiAuth - my ($self) = @_; - $self->wq_io_do('process_inputs'); - $self->wq_close(1); -} - sub lei_import { # the main "lei import" method my ($lei, @inputs) = @_; my $sto = $lei->_lei_store(1); @@ -99,6 +93,7 @@ } no warnings 'once'; *ipc_atfork_child = \&PublicInbox::LeiInput::input_only_atfork_child; +*net_merge_all_done = \&PublicInbox::LeiInput::input_only_net_merge_all_done; # the following works even when LeiAuth is lazy-loaded *net_merge_all = \&PublicInbox::LeiAuth::net_merge_all; diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index 9bcc86e1cacf77c1b18f0302fc2b788bbd4123bc..917f682ba97961c2d35e20935d0e8b69926fd1f9 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -329,6 +329,13 @@ $lei->{auth}->do_auth_atfork($self) if $lei->{auth}; undef; } +# alias this as "net_merge_all_done" to use as an LeiAuth callback +sub input_only_net_merge_all_done { + my ($self) = @_; + $self->wq_io_do('process_inputs'); + $self->wq_close(1); +} + # like Getopt::Long, but for +kw:FOO and -kw:FOO to prepare # for update_xvmd -> update_vmd sub vmd_mod_extract { diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm index 2170e3f2e7de196723715f7f322fdab75aaa4d13..6025c93e0b94675e65bed876c688425b42f84eb2 100644 --- a/lib/PublicInbox/LeiTag.pm +++ b/lib/PublicInbox/LeiTag.pm @@ -19,12 +19,6 @@ } sub input_mbox_cb { input_eml_cb($_[1], $_[0]) } -sub net_merge_all_done { # callback used by LeiAuth - my ($self) = @_; - $self->wq_io_do('process_inputs'); - $self->wq_close(1); -} - sub input_maildir_cb { # maildir_each_eml cb my ($f, $kw, $eml, $self) = @_; input_eml_cb($self, $eml); @@ -117,5 +111,6 @@ } no warnings 'once'; # the following works even when LeiAuth is lazy-loaded *net_merge_all = \&PublicInbox::LeiAuth::net_merge_all; +*net_merge_all_done = \&PublicInbox::LeiInput::input_only_net_merge_all_done; 1;