]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extindex: use localtime to display lock time
authorEric Wong <e@80x24.org>
Sun, 17 Oct 2021 09:52:47 +0000 (22:52 -1100)
committerEric Wong <e@80x24.org>
Sun, 17 Oct 2021 19:04:41 +0000 (19:04 +0000)
Since this is intended for use on the command-line,
include TZ offset in time and try to shorten the
message a bit so it wraps less on a terminal.

lib/PublicInbox/ExtSearchIdx.pm

index 69d048fb73426b7e0656269f944807829f36b773..67d720368922d6013253fc4be27c7464c02f3265 100644 (file)
@@ -719,11 +719,12 @@ sub eidxq_lock_acquire ($) {
                return $locked if $locked eq $cur;
        }
        my ($pid, $time, $euid, $ident) = split(/-/, $cur, 4);
-       my $t = strftime('%Y-%m-%d %k:%M:%S', gmtime($time));
+       my $t = strftime('%Y-%m-%d %k:%M %z', localtime($time));
+       local $self->{current_info} = 'eidxq';
        if ($euid == $> && $ident eq host_ident) {
                if (kill(0, $pid)) {
                        warn <<EOM; return;
-I: PID:$pid (re)indexing Xapian since $t, it will continue our work
+I: PID:$pid (re)indexing since $t, it will continue our work
 EOM
                }
                if ($!{ESRCH}) {