From 93a8c3520c9194eac842ca8aba166923b813b71b Mon Sep 17 00:00:00 2001 From: Jason McVetta Date: Wed, 12 Feb 2020 18:56:54 +0700 Subject: [PATCH] truncate cluster_id from the other end --- django_q/monitor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_q/monitor.py b/django_q/monitor.py index f318923..bccb3ac 100644 --- a/django_q/monitor.py +++ b/django_q/monitor.py @@ -72,7 +72,7 @@ def monitor(run_once=False, broker=None): uptime = '%d:%02d:%02d' % (hours, minutes, seconds) # print to the terminal print(term.move(i, 0) + term.center(stat.host[:col_width - 1], width=col_width - 1)) - print(term.move(i, 1 * col_width) + term.center(str(stat.cluster_id)[:8], width=col_width - 1)) + print(term.move(i, 1 * col_width) + term.center(str(stat.cluster_id)[-8:], width=col_width - 1)) print(term.move(i, 2 * col_width) + term.center(status, width=col_width - 1)) print(term.move(i, 3 * col_width) + term.center(workers, width=col_width - 1)) print(term.move(i, 4 * col_width) + term.center(tasks, width=col_width - 1))