aboutsummaryrefslogtreecommitdiff
path: root/qc_app/jobs.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/jobs.py')
-rw-r--r--qc_app/jobs.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/qc_app/jobs.py b/qc_app/jobs.py
index cf4e4ef..1491015 100644
--- a/qc_app/jobs.py
+++ b/qc_app/jobs.py
@@ -62,12 +62,13 @@ def build_file_verification_job(#pylint: disable=[too-many-arguments]
jobid = str(uuid4())
command = [
sys.executable, "-m", "scripts.validate_file",
- dburi, redisuri, jobid,
+ dburi, redisuri, jobsnamespace(), jobid,
"--redisexpiry", str(ttl_seconds),
str(speciesid), filetype, filepath,
]
return initialise_job(
- redis_conn, jobid, command, "file-verification", ttl_seconds, {
+ redis_conn, jobsnamespace(), jobid, command, "file-verification",
+ ttl_seconds, {
"filetype": filetype,
"filename": os.path.basename(filepath), "percent": 0
})
@@ -77,12 +78,14 @@ def data_insertion_job(# pylint: disable=[too-many-arguments]
speciesid: int, platformid: int, datasetid: int, databaseuri: str,
redisuri: str, ttl_seconds: int) -> dict:
"Build a data insertion job"
+ jobid = str(uuid4())
command = [
sys.executable, "-m", "scripts.insert_data", filetype, filepath,
speciesid, platformid, datasetid, databaseuri, redisuri
]
return initialise_job(
- redis_conn, str(uuid4()), command, "data-insertion", ttl_seconds, {
+ redis_conn, jobsnamespace(), jobid, command, "data-insertion",
+ ttl_seconds, {
"filename": os.path.basename(filepath), "filetype": filetype,
"totallines": totallines
})