Commit 1ca0d04e authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Add json format for status

parent 6c20308f
......@@ -151,6 +151,15 @@ def status(id_job):
minutes = time_e // 60
seconds = time_e - minutes * 60
time_e = "%d min %d secs" % (minutes, seconds)
format = request.args.get("format")
if format is not None and format == "json":
return jsonify({
"status": j_status["status"],
"error": j_status["error"].replace("#ID#", ""),
"id_job": id_job,
"mem_peak": mem_peak,
"time_elapsed": time_e
return render_template("status.html", title=app_title, status=j_status["status"],
error=j_status["error"].replace("#ID#", ""),
id_job=id_job, menu="results", mem_peak=mem_peak,
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