]> Sergey Matveev's repositories - public-inbox.git/commitdiff
inboxwritable: ensure ssoma.lock exists on init
authorEric Wong <e@yhbt.net>
Sat, 27 Jun 2020 10:03:27 +0000 (10:03 +0000)
committerEric Wong <e@yhbt.net>
Sun, 28 Jun 2020 22:27:06 +0000 (22:27 +0000)
This will allow us to use InboxIdle on empty/unindexed v1 inboxes.

lib/PublicInbox/InboxWritable.pm

index f9e28502001499b72d7f6e7766f4e824920862db..9bdf8637e6e02b320298224e794978cd7a6a5344 100644 (file)
@@ -53,6 +53,9 @@ sub init_inbox {
                                $mm->{dbh}->commit;
                        }) if defined($skip_artnum);
                        $sidx->commit_txn_lazy;
+               } else {
+                       open my $fh, '>>', "$dir/ssoma.lock" or
+                               die "$dir/ssoma.lock: $!\n";
                }
        } else {
                my $v2w = importer($self);