aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-07-14 14:20:51 +0300
committerFrederick Muriuki Muriithi2022-07-19 05:08:17 +0300
commit772872452dc98b9919a861c017347e88a6536063 (patch)
treef5edcf89ee9a8b8b2a754ae0b02c8a0442765903
parent1711bbad1409a4def4099d8721deb894a0d5e21c (diff)
downloadgn-uploader-772872452dc98b9919a861c017347e88a6536063.tar.gz
Rename file validation script
As preparation for building a new generic worker script, this commit renames the file validation script from 'worker.py' to 'validate_file.py' so as to ensure the name conforms better to what the script does.
-rw-r--r--qc_app/jobs.py4
-rw-r--r--scripts/validate_file.py (renamed from scripts/worker.py)2
2 files changed, 4 insertions, 2 deletions
diff --git a/qc_app/jobs.py b/qc_app/jobs.py
index 275f9c8..8c93e9f 100644
--- a/qc_app/jobs.py
+++ b/qc_app/jobs.py
@@ -17,7 +17,9 @@ def launch_job(# pylint: disable=[too-many-arguments]
"""Launch a job in the background"""
job_id = str(uuid4())
command = [
- "python3", "-m", "scripts.worker", filetype, filepath, redisurl, job_id]
+ "python3", "-m", "scripts.validate_file", filetype, filepath, redisurl,
+ job_id
+ ]
the_job = {
"job_id": job_id, "command": shlex.join(command), "status": "pending",
"filename": os.path.basename(filepath), "percent": 0,
diff --git a/scripts/worker.py b/scripts/validate_file.py
index c6e989f..9f0a561 100644
--- a/scripts/worker.py
+++ b/scripts/validate_file.py
@@ -1,4 +1,4 @@
-"""External worker script"""
+"""External worker script that checks file for correctness"""
import os
import sys
import traceback