register with service registry; only start chrome right before using it, so that web console vnc windows aren't always full of about:blank

This commit is contained in:
Noah Levitt 2015-11-12 02:56:27 +00:00
parent b91d7e4c3f
commit 343b5c0f82
4 changed files with 76 additions and 25 deletions

View file

@ -70,8 +70,13 @@ def job(job_id):
@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_)
workers_ = r.table("services").filter({"role":"brozzler-worker"}).run()
return flask.jsonify(workers=list(workers_))
@app.route("/api/services")
def services():
services_ = r.table("services").run()
return flask.jsonify(services=list(services_))
@app.route("/api/jobs")
def jobs():