From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 323631F4C4 for ; Tue, 19 Nov 2024 21:47:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1732052873; bh=BEl0HxZxo72kTIwkF+GND7bkXgU6XwcsyQ+6zo6519w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=r5D2r0/1FkgXuUNsA5OVMHvGPlsvjGuhlbwc8UmdkxrHwUYLjKAGdMC3rc08XnCM4 gcslYdSBYOXfEbEQJ0UXLk22RBnl8sZ6RkbpA7DZi87Hoqo3Qit8jjgMYkFzG4K7Xh WRYsHPbyiKZHjMUjJRj++Yha7QnoiXy4fjAMFtsw= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/3] v2writable: use DS and import now() sub Date: Tue, 19 Nov 2024 21:47:50 +0000 Message-ID: <20241119214752.1883670-2-e@80x24.org> In-Reply-To: <20241119214752.1883670-1-e@80x24.org> References: <20241119214752.1883670-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 19bb66ad..f7057359 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -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; }