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

controllers/admin.py: admin/monitor external monitor

We want to monitor externally the states of the workers.
parent d2237b6c
......@@ -25,6 +25,13 @@ def index():
uptime=uptime,
disk_use=disk_use
)
def monitor():
# External monitor
return dict (worker = len(db().select(db.scheduler_worker.ALL)),
in_queue = len(db(db.scheduler_task.status=='QUEUED').select()),
running = len(db(db.scheduler_task.status=='RUNNING').select()))
def worker():
if auth.has_membership("admin"):
......
workers
ALL={{=worker}}
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