diff options
| author | Alexander_Kabui | 2025-01-09 11:49:48 +0300 |
|---|---|---|
| committer | Alexander_Kabui | 2025-01-09 11:49:48 +0300 |
| commit | 22c6290db6bcdd93edc9b4fd40ac204d88afcc7a (patch) | |
| tree | 6c964d38e15d33bf39439a83112465f0b0fd3186 | |
| parent | 396b345ab3c3bf15409b4cb9c37f5496a55c82f9 (diff) | |
| download | genenetwork3-22c6290db6bcdd93edc9b4fd40ac204d88afcc7a.tar.gz | |
refactor: raise and Handle error a app level.
| -rw-r--r-- | gn3/computations/streaming.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gn3/computations/streaming.py b/gn3/computations/streaming.py index 771076c..1cebde3 100644 --- a/gn3/computations/streaming.py +++ b/gn3/computations/streaming.py @@ -2,7 +2,7 @@ import os import subprocess from functools import wraps -from flask import current_app, has_app_context, request +from flask import current_app, request def run_process(cmd, output_file, run_id): @@ -43,8 +43,6 @@ def enable_streaming(func): """ @wraps(func) def decorated_function(*args, **kwargs): - if not has_app_context: - raise RuntimeError("This decorator must be used within an app context.") run_id = request.args.get("id") stream_ouput_file = os.path.join(current_app.config.get("TMPDIR"), f"{run_id}.txt") |
