about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiImport.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-21 18:36:10 +0000
committerEric Wong <e@80x24.org>2021-04-21 23:51:53 +0000
commit6b3ba59d4bfdf20507fd890df6ff1454a93435e4 (patch)
tree16a1cf7d873bf67fe874332b2f4f99073e39158e /lib/PublicInbox/LeiImport.pm
parent42bf77d28591740ac94e4e3d50661ae84c88ca5b (diff)
downloadpublic-inbox-6b3ba59d4bfdf20507fd890df6ff1454a93435e4.tar.gz
Code is the enemy, and there's no need to duplicate things, here.
There may be further opportunities along these lines to further
deduplicate things...
Diffstat (limited to 'lib/PublicInbox/LeiImport.pm')
-rw-r--r--lib/PublicInbox/LeiImport.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm
index d33143ef..16271603 100644
--- a/lib/PublicInbox/LeiImport.pm
+++ b/lib/PublicInbox/LeiImport.pm
@@ -35,17 +35,10 @@ sub input_net_cb { # imap_each, nntp_each cb
         input_eml_cb($self, $eml, $self->{-import_kw} ? { kw => $kw } : undef);
 }
 
-sub import_done_wait { # dwaitpid callback
-        my ($arg, $pid) = @_;
-        my ($imp, $lei) = @$arg;
-        $lei->child_error($?, 'non-fatal errors during import') if $?;
-        $lei->dclose;
-}
-
 sub import_done { # EOF callback for main daemon
         my ($lei) = @_;
         my $imp = delete $lei->{imp} // return $lei->fail('BUG: {imp} gone');
-        $imp->wq_wait_old(\&import_done_wait, $lei);
+        $imp->wq_wait_old($lei->can('wq_done_wait'), $lei, 'non-fatal');
 }
 
 sub net_merge_complete { # callback used by LeiAuth