summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-13 16:13:12 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-13 16:13:12 +0000
commit0496a98fe0b580937c378485ed00f80f8d988adf (patch)
treef0cbf25680aa0f99a1d1abf64d9c0a8b29d30a20 /utils
parent1565388e506f7c7226ba1aa26430492146f784b7 (diff)
downloadrspamd-0496a98fe0b580937c378485ed00f80f8d988adf.tar.gz
rspamd-0496a98fe0b580937c378485ed00f80f8d988adf.zip
[Minor] Fix spinner update
Diffstat (limited to 'utils')
-rwxr-xr-xutils/rspamd_stats.pl5
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