about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiTag.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-28 07:52:02 +0000
committerEric Wong <e@80x24.org>2021-04-28 19:30:58 +0000
commiteee88c0967d741686e1d14a01bc34c55167213e4 (patch)
tree9876873bc9550c9327b1c1c35494299033c1d03f /lib/PublicInbox/LeiTag.pm
parent63e2751ace2dd35a661620a9ad30d6c92948a009 (diff)
downloadpublic-inbox-eee88c0967d741686e1d14a01bc34c55167213e4.tar.gz
This lets us share more code and reduces cognitive overhead when
it comes to picking names (because {lsss} was ridiculous).

We'll need to ensure the first error set in lei is the actual
error we exit with, otherwise things can get confusing and
errors may get lost.
Diffstat (limited to 'lib/PublicInbox/LeiTag.pm')
-rw-r--r--lib/PublicInbox/LeiTag.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm
index 3cda2eca..989a6954 100644
--- a/lib/PublicInbox/LeiTag.pm
+++ b/lib/PublicInbox/LeiTag.pm
@@ -19,12 +19,6 @@ sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh
 
 sub input_mbox_cb { input_eml_cb($_[1], $_[0]) }
 
-sub _lei_wq_eof { # EOF callback for main daemon
-        my ($lei) = @_;
-        my $tag = delete $lei->{tag} // return $lei->dclose;
-        $tag->wq_wait_old($lei->can('wq_done_wait'), $lei, 'non-fatal');
-}
-
 sub net_merge_complete { # callback used by LeiAuth
         my ($self) = @_;
         $self->wq_io_do('process_inputs');
@@ -57,7 +51,8 @@ sub lei_tag { # the "lei tag" method
         $self->{vmd_mod} = $vmd_mod;
         my $j = $self->{-wq_nr_workers} = 1; # locked for now
         (my $op_c, $ops) = $lei->workers_start($self, 'lei-tag', $j, $ops);
-        $lei->{tag} = $self;
+        $lei->{wq1} = $self;
+        $lei->{-err_type} = 'non-fatal';
         net_merge_complete($self) unless $lei->{auth};
         $op_c->op_wait_event($ops);
 }