about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiImport.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-22 07:08:21 -0200
committerEric Wong <e@80x24.org>2021-04-22 17:05:48 -0400
commit21c0a681c3c9bdcdeffc6516db65812c7635cd68 (patch)
tree1365cd39205672f7ab2aa10596bdf0df1315e095 /lib/PublicInbox/LeiImport.pm
parent311a5d37ad275cd75b1e64d87827c4d13fe4bfab (diff)
downloadpublic-inbox-21c0a681c3c9bdcdeffc6516db65812c7635cd68.tar.gz
No point in burning through bandwidth to import stuff we already
saw.  All this logic is shared with -watch but uses a different
pathname for lei since it's tied to lei/store (and not a
public-inbox).
Diffstat (limited to 'lib/PublicInbox/LeiImport.pm')
-rw-r--r--lib/PublicInbox/LeiImport.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm
index 16271603..accf08f5 100644
--- a/lib/PublicInbox/LeiImport.pm
+++ b/lib/PublicInbox/LeiImport.pm
@@ -58,6 +58,11 @@ sub lei_import { # the main "lei import" method
         my $j = $lei->{opt}->{jobs} // scalar(@{$self->{inputs}}) || 1;
         if (my $net = $lei->{net}) {
                 # $j = $net->net_concurrency($j); TODO
+                if ($lei->{opt}->{incremental} // 1) {
+                        $net->{incremental} = 1;
+                        $net->{itrk_fn} = $lei->store_path .
+                                                '/net_last.sqlite3';
+                }
         } else {
                 my $nproc = $self->detect_nproc;
                 $j = $nproc if $j > $nproc;