about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiToMail.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-30 04:30:57 +0000
committerEric Wong <e@80x24.org>2023-01-30 06:42:42 +0000
commit7b654d175cf2e31b4354929ea678563f534947e5 (patch)
tree3dcfb9dfc38e005c5aeeb6e673968610e6393e91 /lib/PublicInbox/LeiToMail.pm
parentf9557e2c6b7510d278310066fe7c26f84cae6e1d (diff)
downloadpublic-inbox-7b654d175cf2e31b4354929ea678563f534947e5.tar.gz
This brings t/lei-index.t back down from ~8 to ~3s.  I didn't
notice this before was because the LeiNoteEvent timer was firing
every 5s and clearing circular refs and parallel testing meant
the delay got hidden.

Fixes: 4a2a95bbc78f99c8 (ipc+lei: switch to awaitpid, 2023-01-17)
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r--lib/PublicInbox/LeiToMail.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index 6a4554e7..31eba794 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -652,7 +652,7 @@ sub _do_augment_mbox {
         $dedupe->pause_dedupe if $dedupe;
 }
 
-sub v2w_done_wait { # awaitpid cb (via awaitpid_init)
+sub v2w_done_wait { # awaitpid cb
         my ($pid, $v2w, $lei) = @_;
         $lei->child_error($?, "error for $v2w->{ibx}->{inboxdir}") if $?;
 }
@@ -679,8 +679,8 @@ sub _pre_augment_v2 {
         PublicInbox::InboxWritable->new($ibx, @creat);
         $ibx->init_inbox if @creat;
         my $v2w = $ibx->importer;
-        $v2w->awaitpid_init(\&v2w_done_wait, $lei);
-        $v2w->wq_workers_start("lei/v2w $dir", 1, $lei->oldset, {lei => $lei});
+        $v2w->wq_workers_start("lei/v2w $dir", 1, $lei->oldset, {lei => $lei},
+                                \&v2w_done_wait, $lei);
         $lei->{v2w} = $v2w;
         return if !$lei->{opt}->{shared};
         my $d = "$lei->{ale}->{git}->{git_dir}/objects";