Browse Source

[Minor] Fix spinner update

tags/1.7.1
Vsevolod Stakhov 6 years ago
parent
commit
0496a98fe0
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      utils/rspamd_stats.pl

+ 3
- 2
utils/rspamd_stats.pl View File

@@ -693,9 +693,10 @@ sub numeric {
sub spinner {
my @spinner = qw{/ - \ |};
return
if ( ( time - $spinner_update_time ) < 1 );
printf "%s\033[1D", $spinner[ time % @spinner ];
if ( $json || ( time - $spinner_update_time ) < 1 );
printf "%s\r", $spinner[ $spinner_update_time % @spinner ];
$spinner_update_time = time;
select()->flush();
}

# Convert syslog timestamp to "ISO 8601 like" format

Loading…
Cancel
Save