about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-16 20:56:39 -0500
committerEric Wong <e@80x24.org>2021-09-17 04:41:03 +0000
commit1323196d1df67db5cb47a171a60236049c1e5ce5 (patch)
treee81ed65e5659a1e8d052a19acca8274f565b0a68 /lib/PublicInbox/LEI.pm
parent40e1f1612777251169fe9fb0d81bc5d062dd72c8 (diff)
downloadpublic-inbox-1323196d1df67db5cb47a171a60236049c1e5ce5.tar.gz
Merely pruning mail synchronization information was
insufficient for Maildir: renames are common in Maildir
and we need to detect them after-the-fact when lei-daemon
isn't running.

Running this command could make "lei index" far more
useful...

v2: close R/O mail_sync.sqlite3 dbh before fork
  Keeping the DB file handle open across fork can cause bad things
  to happen even if we don't use it since sqlite3 itself still knows
  about it (but doesn't know Perl code doesn't know about it).
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r--lib/PublicInbox/LEI.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index ec103231..9794497b 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -263,7 +263,7 @@ our %CMD = ( # sorted in order of importance/use:
         @net_opt, @c_opt ],
 'forget-mail-sync' => [ 'LOCATION...',
         'forget sync information for a mail folder', @c_opt ],
-'prune-mail-sync' => [ 'LOCATION...|--all',
+'refresh-mail-sync' => [ 'LOCATION...|--all',
         'prune dangling sync data for a mail folder', 'all:s', @c_opt ],
 'export-kw' => [ 'LOCATION...|--all',
         'one-time export of keywords of sync sources',
@@ -616,6 +616,7 @@ sub pkt_ops {
         $ops->{x_it} = [ \&x_it, $lei ];
         $ops->{child_error} = [ \&child_error, $lei ];
         $ops->{incr} = [ \&incr, $lei ];
+        $ops->{sto_done_request} = [ \&sto_done_request, $lei, $lei->{sock} ];
         $ops;
 }