aboutsummaryrefslogtreecommitdiff
path: root/qc_app/parse.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-07-15 07:36:55 +0300
committerFrederick Muriuki Muriithi2022-07-19 05:08:17 +0300
commit52024b1f6cde74b51181ce4108cf01611a7ea636 (patch)
treea02306cadf4f7a1b1e5c8f89d295eb41a4a6fd8b /qc_app/parse.py
parente59108d3cea2e61f1a23c22c20edf2d3974e7a10 (diff)
downloadgn-uploader-52024b1f6cde74b51181ce4108cf01611a7ea636.tar.gz
Rework: Use generic worker script to launch process
Use the generic worker script as the interface for launching external processes.
Diffstat (limited to 'qc_app/parse.py')
-rw-r--r--qc_app/parse.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/qc_app/parse.py b/qc_app/parse.py
index 2a33fd0..70ef551 100644
--- a/qc_app/parse.py
+++ b/qc_app/parse.py
@@ -40,11 +40,14 @@ def parse():
if errors:
return redirect(url_for("entry.upload_file"))
- with Redis.from_url(app.config["REDIS_URL"], decode_responses=True) as rconn:
+ redisurl = app.config["REDIS_URL"]
+ with Redis.from_url(redisurl, decode_responses=True) as rconn:
job = jobs.launch_job(
- rconn, filepath, filetype, app.config["REDIS_URL"],
- f"{app.config['UPLOAD_FOLDER']}/job_errors",
- app.config["JOBS_TTL_SECONDS"])
+ jobs.build_file_verification_job(
+ rconn, filepath, filetype, redisurl,
+ app.config["JOBS_TTL_SECONDS"]),
+ redisurl,
+ f"{app.config['UPLOAD_FOLDER']}/job_errors")
return redirect(url_for("parse.parse_status", job_id=job["job_id"]))