]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
v2writable: use DS and import now() sub
authorEric Wong <e@80x24.org>
Tue, 19 Nov 2024 21:47:50 +0000 (21:47 +0000)
committerEric Wong <e@80x24.org>
Wed, 20 Nov 2024 17:39:44 +0000 (17:39 +0000)
There'll be more uses of this function, so import DS
to avoid surprises even though it's pulled in by other
modules, already.

lib/PublicInbox/V2Writable.pm

index 19bb66ada6703e41c7b556145098014540bb024b..f705735959c0017060b8a043a0501bc6b45e50e8 100644 (file)
@@ -21,6 +21,7 @@ use PublicInbox::Msgmap;
 use PublicInbox::Spawn qw(spawn popen_rd run_die);
 use PublicInbox::Search;
 use PublicInbox::SearchIdx qw(log2stack is_ancestor check_size is_bad_blob);
+use PublicInbox::DS qw(now);
 use IO::Handle; # ->autoflush
 use POSIX ();
 use Carp qw(confess);
@@ -723,7 +724,7 @@ sub reindex_checkpoint ($$) {
        # allow -watch or -mda to write...
        $self->idx_init($sync->{-opt}); # reacquire lock
        if (my $intvl = $sync->{check_intvl}) { # eidx
-               $sync->{next_check} = PublicInbox::DS::now() + $intvl;
+               $sync->{next_check} = now + $intvl;
        }
        $mm_tmp->atfork_parent if $mm_tmp;
 }