diff options
author | Eric Wong <e@80x24.org> | 2021-05-26 18:08:57 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-26 19:33:30 +0000 |
commit | 1d6e1f9a6a66a42d18f109aea406237cf8571597 (patch) | |
tree | 827b7465812239e9b4070eaa7162b33cabf42584 /lib/PublicInbox/LeiUp.pm | |
parent | 708b182a57373172f5523f3dc297659d58e03b58 (diff) | |
download | public-inbox-1d6e1f9a6a66a42d18f109aea406237cf8571597.tar.gz |
The cost of supporting separate code paths between oneshot and daemon isn't worth the trouble; especially if there are more users to support. The test suite time nearly doubles with oneshot, so that's hurting developer productivity. FD passing is currently required to work efficiently with remote HTTP(S) queries which return large messages, as seen in commit 708b182a57373172f5523f3dc297659d58e03b58 ("ipc: wq: handle >MAX_ARG_STRLEN && <EMSGSIZE case"). Additionally, upcoming support for IMAP IDLE and inotify-based monitoring of Maildirs cannot work properly without a background daemon.
Diffstat (limited to 'lib/PublicInbox/LeiUp.pm')
-rw-r--r-- | lib/PublicInbox/LeiUp.pm | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/PublicInbox/LeiUp.pm b/lib/PublicInbox/LeiUp.pm index 4399c4fb..9069232b 100644 --- a/lib/PublicInbox/LeiUp.pm +++ b/lib/PublicInbox/LeiUp.pm @@ -76,22 +76,18 @@ sub lei_up { my @all = PublicInbox::LeiSavedSearch::list($lei); my @local = grep(!m!\Aimaps?://!i, @all); $lei->_lei_store->write_prepare($lei); # share early - if ($lei->{oneshot}) { # synchronous - up1_redispatch($lei, $_) for @local; - } else { - # daemon mode, re-dispatch into our event loop w/o - # creating an extra fork-level - require PublicInbox::DS; - require PublicInbox::PktOp; - my ($op_c, $op_p) = PublicInbox::PktOp->pair; - for my $o (@local) { - PublicInbox::DS::requeue(sub { - up1_redispatch($lei, $o, $op_p); - }); - } - $lei->event_step_init; - $op_c->{ops} = { '' => [$lei->can('dclose'), $lei] }; + # daemon mode, re-dispatch into our event loop w/o + # creating an extra fork-level + require PublicInbox::DS; + require PublicInbox::PktOp; + my ($op_c, $op_p) = PublicInbox::PktOp->pair; + for my $o (@local) { + PublicInbox::DS::requeue(sub { + up1_redispatch($lei, $o, $op_p); + }); } + $lei->event_step_init; + $op_c->{ops} = { '' => [$lei->can('dclose'), $lei] }; } else { up1($lei, $out); } |