about summary refs log tree commit diff
path: root/gn3/api/rqtl.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api/rqtl.py')
-rw-r--r--gn3/api/rqtl.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py
index ad918d8..1881a4e 100644
--- a/gn3/api/rqtl.py
+++ b/gn3/api/rqtl.py
@@ -128,15 +128,9 @@ def run_process(cmd, output_file, run_id):
                     file_handler.write(line.decode("utf-8"))
             process.wait()
         if process.returncode == 0:
-            return jsonify({"msg": "success",
-                            "results": "file_here",
-                            "run_id": run_id})
-
-        return jsonify({"msg": "fail",
-                        "error": "Process failed",
-                        "run_id": run_id})
-
+            return {"msg": "success", "code": 0, "run_id": run_id}
+        return {"msg": "Process failed",
+                "code": process.returncode, "run_id": run_id}
     except subprocess.CalledProcessError as error:
-        return jsonify({"msg": "fail",
-                        "error": str(error),
-                        "run_id": run_id})
+        return {"msg": "Process failed",
+                "error": str(error), "run_id": run_id}