Commit b1851b27 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

controllers/admin.py, views/admin/*: adds ASSIGNED stats, some rewording

parent bc9bce8f
......@@ -20,7 +20,8 @@ def index():
disk_use, err = p.communicate()
return dict(worker = len(db().select(db.scheduler_worker.ALL)),
in_queue = len(db(db.scheduler_task.status=='QUEUED').select()),
queued = len(db(db.scheduler_task.status=='QUEUED').select()),
assigned = len(db(db.scheduler_task.status=='ASSIGNED').select()),
running = len(db(db.scheduler_task.status=='RUNNING').select()),
uptime=uptime,
disk_use=disk_use
......@@ -30,7 +31,8 @@ def index():
def monitor():
# External monitor
return dict (worker = len(db().select(db.scheduler_worker.ALL)),
in_queue = len(db(db.scheduler_task.status=='QUEUED').select()),
queued = len(db(db.scheduler_task.status=='QUEUED').select()),
assigned = len(db(db.scheduler_task.status=='ASSIGNED').select()),
running = len(db(db.scheduler_task.status=='RUNNING').select()))
def worker():
......
......@@ -27,11 +27,12 @@
</br>
<div>
Worker status
Workers and tasks
<div class="console-div">
<div class="console-flex">active worker : {{=worker}}</div>
<div class="console-flex">run in process : {{=running}}</div>
<div class="console-flex">run in queue : {{=in_queue}}</div>
<div class="console-flex">active workers: {{=worker}}</div>
<div class="console-flex">QUEUED: {{=queued}}</div>
<div class="console-flex">ASSIGNED: {{=assigned}}</div>
<div class="console-flex">RUNNING: {{=running}}</div>
</div>
</div>
......
workers
ALL={{=worker}}
tasks
QUEUED={{=queued}}
ASSIGNED={{=assigned}}
RUNNING={{=running}}
QUEUED={{=in_queue}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment