diff options
author | Eric Wong <e@80x24.org> | 2021-09-18 09:33:32 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-18 20:28:16 +0000 |
commit | f3d0e746c6a35c8600b91af99958a52cbc114a4b (patch) | |
tree | 77d4a48575562c953f4bb1de8c1455fa749391b9 /lib/PublicInbox/LeiToMail.pm | |
parent | 9d54d6260497a2a08bdefd25f02e817ad6505264 (diff) | |
download | public-inbox-f3d0e746c6a35c8600b91af99958a52cbc114a4b.tar.gz |
Since we can't use maxuid for remote externals, automatically maintaining the last time we got results and appending a dt: range to the query will prevent HTTP(S) responses from getting too big. We could be using "rt:", but no stable release of public-inbox supports it, yet, so we'll use dt:, instead. By default, there's a two day fudge factor to account for MTA downtime and delays; which is hopefully enough. The fudge factor may be changed per-invocation with the --remote-fudge-factor=INTERVAL option Since different externals can have different message transport routes, "lastresult" entries are stored on a per-external basis.
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r-- | lib/PublicInbox/LeiToMail.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index d3253d9b..9f7171fb 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -437,7 +437,9 @@ sub new { ($lei->{opt}->{save} ? 'LeiSavedSearch' : 'LeiDedupe'); eval "require $dd_cls"; die "$dd_cls: $@" if $@; - $dd_cls->new($lei); + my $dd = $dd_cls->new($lei); + $lei->{lss} //= $dd if $dd && $dd->can('cfg_set'); + $dd; }; $self; } |