about summary refs log tree commit homepage
path: root/lib/PublicInbox/PktOp.pm
DateCommit message (Collapse)
2021-02-04pkt_op: do not exit subroutine via "next"
"next" apparently doesn't work in "do {} while" loops, so just use "while" as it makes no difference, here.
2021-02-04lei: propagate curl errors, improve internal consistency
IO::Uncompress::Gunzip seems to be losing $? when closing PublicInbox::ProcessPipe. To workaround this, do a synchronous waitpid ourselves to force proper $? reporting update tests to use the new --only feature for testing invalid URLs. This improves internal code consistency by having {pkt_op} parse the same ASCII-only protocol script/lei understands. We no longer pass {sock} to worker processes at all, further reducing FD pressure on per-user limits.
2021-02-04pkt_op: rely on DS::in_loop global
No reason to check for $lei->{oneshot} here.
2021-02-03pktop: fix potential undefined var
In case we have other bugs in our code.
2021-02-03lei q: emit progress and counting via PktOp
Sometimes it can be confusing for "lei q" to finish writing to a Maildir|mbox and not know if it did anything. So show some per-external progress and stats. These can be disabled via the new --quiet/-q switch. We differ slightly from mairix(1) here, as we use stderr instead of stdout for reporting totals (and we support parallel queries from various sources).
2021-02-03lei: switch to use SEQPACKET socketpair instead of pipe
This will allow us to use larger messages and do progress reporting to accumulate in the main daemon.