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-27 11:07:51 +0000
committerEric Wong <e@80x24.org>2021-04-27 21:28:56 -0400
commit787cbc523c0beac69f6df8b8a689684864a6594e (patch)
tree34663f6d5488083e4f380b343db9772e2fbd4982 /lib/PublicInbox/LeiImport.pm
parent98cd36cdf25fb27e006bd49a3d5bd479be44ce50 (diff)
downloadpublic-inbox-787cbc523c0beac69f6df8b8a689684864a6594e.tar.gz
Simplify our internals a little bit.
Diffstat (limited to 'lib/PublicInbox/LeiImport.pm')
-rw-r--r--lib/PublicInbox/LeiImport.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm
index daaa6753..e0d899cc 100644
--- a/lib/PublicInbox/LeiImport.pm
+++ b/lib/PublicInbox/LeiImport.pm
@@ -53,7 +53,7 @@ sub input_nntp_cb { # nntp_each
         input_eml_cb($self, $eml, $self->{-import_kw} ? { kw => $kw } : undef);
 }
 
-sub import_done { # EOF callback for main daemon
+sub _lei_wq_eof { # EOF callback for main daemon
         my ($lei) = @_;
         my $imp = delete $lei->{imp} // return $lei->fail('BUG: {imp} gone');
         $imp->wq_wait_old($lei->can('wq_done_wait'), $lei, 'non-fatal');
@@ -90,10 +90,10 @@ sub lei_import { # the main "lei import" method
                 my $nproc = $self->detect_nproc;
                 $j = $nproc if $j > $nproc;
         }
-        my $ops = { '' => [ \&import_done, $lei ] };
+        my $ops = {};
         $lei->{auth}->op_merge($ops, $self) if $lei->{auth};
         $self->{-wq_nr_workers} = $j // 1; # locked
-        (my $op_c, $ops) = $lei->workers_start($self, 'lei_import', $j, $ops);
+        (my $op_c, $ops) = $lei->workers_start($self, 'lei-import', $j, $ops);
         $lei->{imp} = $self;
         net_merge_complete($self) unless $lei->{auth};
         $op_c->op_wait_event($ops);