aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-24 10:40:59 +0300
committerFrederick Muriuki Muriithi2024-01-24 10:40:59 +0300
commit96c600723726c3391532d86d17183bea960ece57 (patch)
treef168eec2a8312a6c9fc4ee22a928e3d77472071d
parent3bde6607290bada342b53bd9263ad364c50c3d3a (diff)
downloadgn-uploader-96c600723726c3391532d86d17183bea960ece57.tar.gz
redis-prefix: update "upload samples" path
-rw-r--r--qc_app/samples.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/qc_app/samples.py b/qc_app/samples.py
index bf33715..cf97b8d 100644
--- a/qc_app/samples.py
+++ b/qc_app/samples.py
@@ -240,6 +240,7 @@ def upload_samples():
the_job = jobs.launch_job(
jobs.initialise_job(
rconn,
+ jobs.jobsnamespace(),
str(uuid.uuid4()),
build_sample_upload_job(
species["SpeciesId"],
@@ -259,7 +260,8 @@ def upload_samples():
@samples.route("/upload/status/<uuid:job_id>", methods=["GET"])
def upload_status(job_id: uuid.UUID):
"""Check on the status of a samples upload job."""
- job = with_redis_connection(lambda rconn: jobs.job(rconn, str(job_id)))
+ job = with_redis_connection(lambda rconn: jobs.job(
+ rconn, jobs.jobsnamespace(), job_id))
if job:
status = job["status"]
if status == "success":
@@ -285,7 +287,8 @@ def upload_status(job_id: uuid.UUID):
@samples.route("/upload/failure/<uuid:job_id>", methods=["GET"])
def upload_failure(job_id: uuid.UUID):
"""Display the errors of the samples upload failure."""
- job = with_redis_connection(lambda rconn: jobs.job(rconn, str(job_id)))
+ job = with_redis_connection(lambda rconn: jobs.job(
+ rconn, jobs.jobsnamespace(), job_id))
if not bool(job):
return render_template("no_such_job.html", job_id=job_id), 400