mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-04 01:08:13 +08:00
monitor TQ will indicate green when queue_limit has been reached.
This commit is contained in:
+5
-3
@@ -53,9 +53,11 @@ def monitor(run_once=False):
|
|||||||
elif stat.status == Conf.IDLE:
|
elif stat.status == Conf.IDLE:
|
||||||
status = str(Conf.IDLE)
|
status = str(Conf.IDLE)
|
||||||
# color q's
|
# color q's
|
||||||
tasks = stat.task_q_size
|
tasks = str(stat.task_q_size)
|
||||||
if tasks > 0:
|
if stat.task_q_size > 0:
|
||||||
tasks = term.cyan(str(tasks))
|
tasks = term.cyan(str(stat.task_q_size))
|
||||||
|
if Conf.QUEUE_LIMIT and stat.task_q_size == Conf.QUEUE_LIMIT:
|
||||||
|
tasks = term.green(str(stat.task_q_size))
|
||||||
results = stat.done_q_size
|
results = stat.done_q_size
|
||||||
if results > 0:
|
if results > 0:
|
||||||
results = term.cyan(str(results))
|
results = term.cyan(str(results))
|
||||||
|
|||||||
Reference in New Issue
Block a user