about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiToMail.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-25 06:17:54 +0000
committerEric Wong <e@80x24.org>2021-09-25 08:53:48 +0000
commitd0100ddd9fe00197cc846d83e70b7611c57dbf43 (patch)
treee52ddb16cffcb623c7076fd026dde5037fc19933 /lib/PublicInbox/LeiToMail.pm
parent562cae2dc6dfd8b6ae85094115f67fe8d57cec8e (diff)
downloadpublic-inbox-d0100ddd9fe00197cc846d83e70b7611c57dbf43.tar.gz
Since switching to SOCK_SEQUENTIAL, we no longer have to use
fixed-width records to guarantee atomic reads.  Thus we can
maintain more human-readable/searchable PktOp opcodes.

Furthermore, we can infer the subroutine name in many cases
to avoid repeating ourselves by specifying a command-name
twice (e.g. $ops->{CMD} => [ \&CMD, $obj ]; can now simply be
written as: $ops->{CMD} => [ $obj ]  if CMD is a method of
$obj.
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r--lib/PublicInbox/LeiToMail.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index 467b27bf..d42759cf 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -714,16 +714,15 @@ sub do_post_auth {
                 } else { # Maildir
                         $self->{shard_info} = [ $mod, $shard ];
                 }
-                $aug = '+'; # incr_post_augment
+                $aug = 'incr_post_augment';
         } elsif ($self->{-wq_worker_nr} == 0) { # 1st worker do_augment
-                $aug = '.'; # do_post_augment
+                $aug = 'do_post_augment';
         }
         if ($aug) {
                 local $0 = 'do_augment';
                 eval { do_augment($self, $lei) };
                 $lei->fail($@) if $@;
-                $lei->{pkt_op_p}->pkt_do($aug) == 1 or
-                                die "do_post_augment trigger: $!";
+                $lei->{pkt_op_p}->pkt_do($aug) or die "pkt_do($aug): $!";
         }
         # done augmenting, connect the compressor pipe for each worker
         if (my $zpipe = delete $lei->{zpipe}) {