diff options
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/rspamd_stats.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/rspamd_stats.pl b/utils/rspamd_stats.pl index 3af8c7bc8..822985ed9 100755 --- a/utils/rspamd_stats.pl +++ b/utils/rspamd_stats.pl @@ -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 |