diff options
author | Eric Wong <e@80x24.org> | 2023-01-30 04:30:57 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-30 06:42:42 +0000 |
commit | 7b654d175cf2e31b4354929ea678563f534947e5 (patch) | |
tree | 3dcfb9dfc38e005c5aeeb6e673968610e6393e91 /lib/PublicInbox/LeiStore.pm | |
parent | f9557e2c6b7510d278310066fe7c26f84cae6e1d (diff) | |
download | public-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/LeiStore.pm')
-rw-r--r-- | lib/PublicInbox/LeiStore.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 0ecf1388..fce15a72 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -604,8 +604,8 @@ sub recv_and_run { $self->SUPER::recv_and_run(@args); } -sub _sto_atexit { # awaitpid cb (via awaitpid_init) - my ($pid, $sto) = @_; +sub _sto_atexit { # awaitpid cb + my ($pid) = @_; warn "lei/store PID:$pid died \$?=$?\n" if $?; } @@ -620,12 +620,11 @@ sub write_prepare { # Mail we import into lei are private, so headers filtered out # by -mda for public mail are not appropriate local @PublicInbox::MDA::BAD_HEADERS = (); - $self->awaitpid_init(\&_sto_atexit); # outlives $lei $self->wq_workers_start("lei/store $dir", 1, $lei->oldset, { lei => $lei, -err_wr => $w, to_close => [ $r ], - }); + }, \&_sto_atexit); require PublicInbox::LeiStoreErr; PublicInbox::LeiStoreErr->new($r, $lei); } |