aboutsummaryrefslogtreecommitdiff
path: root/qc_app/jobs.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-10-16 14:41:39 +0300
committerFrederick Muriuki Muriithi2023-10-16 14:41:39 +0300
commitc9af16ce37ccfbf75183ed0214e3a52a9d91dcc7 (patch)
tree1f6e2ae055e40fe326883cb120dc9788c2673e39 /qc_app/jobs.py
parent0d5dc5489837957e3fab513b9dcc550eddfe53ca (diff)
downloadgn-uploader-c9af16ce37ccfbf75183ed0214e3a52a9d91dcc7.tar.gz
Indicate progress for data insert.
Diffstat (limited to 'qc_app/jobs.py')
-rw-r--r--qc_app/jobs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/qc_app/jobs.py b/qc_app/jobs.py
index dc9ba92..5f351d4 100644
--- a/qc_app/jobs.py
+++ b/qc_app/jobs.py
@@ -41,9 +41,9 @@ def build_file_verification_job(
})
def data_insertion_job(# pylint: disable=[too-many-arguments]
- redis_conn: Redis, filepath: str, filetype: str, speciesid: int,
- platformid: int, datasetid: int, databaseuri: str, redisuri: str,
- ttl_seconds: int) -> dict:
+ redis_conn: Redis, filepath: str, filetype: str, totallines: int,
+ speciesid: int, platformid: int, datasetid: int, databaseuri: str,
+ redisuri: str, ttl_seconds: int) -> dict:
"Build a data insertion job"
command = [
sys.executable, "-m", "scripts.insert_data", filetype, filepath,
@@ -52,6 +52,7 @@ def data_insertion_job(# pylint: disable=[too-many-arguments]
return __init_job__(
redis_conn, str(uuid4()), command, "data-insertion", ttl_seconds, {
"filename": os.path.basename(filepath), "filetype": filetype,
+ "totallines": totallines
})
def launch_job(the_job: dict, redisurl: str, error_dir):