From ba21ca6f6d237f3e2d30a65d44300688e521d10f Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Thu, 9 Jan 2025 10:44:32 +0300 Subject: refactor: remove obsolete streaming endpoint. --- gn3/api/rqtl2.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'gn3/api') diff --git a/gn3/api/rqtl2.py b/gn3/api/rqtl2.py index a6ac411..e26b9ed 100644 --- a/gn3/api/rqtl2.py +++ b/gn3/api/rqtl2.py @@ -45,19 +45,3 @@ def compute(): return jsonify({"msg": "fail", "error": "Process failed", "run_id": run_id}) - - -@rqtl2.route("/stream/", methods=["GET"]) -def stream(identifier="output"): - """ This endpoints streams stdout from a file expects - the indetifier to be the file """ - output_file = os.path.join(current_app.config.get("TMPDIR"), - f"{identifier}.txt") - seek_position = int(request.args.get("peak", 0)) - with open(output_file, encoding="utf-8") as file_handler: - # read to the last position default to 0 - file_handler.seek(seek_position) - results = {"data": file_handler.readlines(), - "run_id": identifier, - "pointer": file_handler.tell()} - return jsonify(results) -- cgit 1.4.1