proof of concept presenting workers in web console with novnc

This commit is contained in:
Noah Levitt 2015-10-27 19:00:44 +00:00
parent a0f4fd449c
commit 7b39ba021b
11 changed files with 182 additions and 140 deletions

View file

@ -68,6 +68,11 @@ def job(job_id):
job_ = r.table("jobs").get(job_id).run()
return flask.jsonify(job_)
@app.route("/api/workers")
def workers():
workers_ = [{"host":host,"vnc_websocket_port":8901} for host in ["aidata400", "aidata401", "aidata400-bu", "aidata401-bu"]]
return flask.jsonify(workers=workers_)
@app.route("/api/jobs")
def jobs():
jobs_ = list(r.table("jobs").run())