This commit is contained in:
Stan
2026-08-01 00:55:17 +02:00
parent 2fe20033e3
commit 5ff834b794
+5 -1
View File
@@ -97,6 +97,8 @@ def monitor(run_once=False, broker=None):
for stat in stats: for stat in stats:
status = stat.status status = stat.status
# color status # color status
if stat.status == Conf.STARTING:
status = term.yellow(str(Conf.STARTING))
if stat.status == Conf.WORKING: if stat.status == Conf.WORKING:
status = term.green(str(Conf.WORKING)) status = term.green(str(Conf.WORKING))
elif stat.status == Conf.STOPPING: elif stat.status == Conf.STOPPING:
@@ -105,6 +107,8 @@ def monitor(run_once=False, broker=None):
status = term.red(str(Conf.STOPPED)) status = term.red(str(Conf.STOPPED))
elif stat.status == Conf.IDLE: elif stat.status == Conf.IDLE:
status = str(Conf.IDLE) status = str(Conf.IDLE)
else:
status = _("Unknown")
# color q's # color q's
tasks = str(stat.task_q_size) tasks = str(stat.task_q_size)
if stat.task_q_size > 0: if stat.task_q_size > 0:
@@ -138,7 +142,7 @@ def monitor(run_once=False, broker=None):
) )
print( print(
term.move(i, 3 * col_width) term.move(i, 3 * col_width)
+ term.center(workers, width=col_width - 1) + term.center(str(workers), width=col_width - 1)
) )
print( print(
term.move(i, 4 * col_width) term.move(i, 4 * col_width)