diff options
author | Frederick Muriuki Muriithi | 2024-01-22 08:54:29 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-01-22 08:54:29 +0300 |
commit | f875926183e2e26881c3288e2f5c3d8ffe6397b8 (patch) | |
tree | 9e1ceb14a61bd5e6351ff5ed706fd3c02e7270bc /scripts | |
parent | cdd4dc456e56bb4eb055e1cb7f2518d45fb3bfb9 (diff) | |
download | gn-uploader-f875926183e2e26881c3288e2f5c3d8ffe6397b8.tar.gz |
UI: Show progress of R/qtl2 bundle processing.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/process_rqtl2_bundle.py | 1 | ||||
-rw-r--r-- | scripts/worker.py | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/process_rqtl2_bundle.py b/scripts/process_rqtl2_bundle.py index 105f787..feb5e19 100644 --- a/scripts/process_rqtl2_bundle.py +++ b/scripts/process_rqtl2_bundle.py @@ -59,7 +59,6 @@ def process_bundle(dbconn: mdb.Connection, rconn: Redis, jobid: uuid.UUID) -> in try: thejob = parse_job(rconn, jobid) meta = thejob["bundle-metadata"] - logger.debug("The metadata: %s", meta) rconn.hset(str(jobid), "geno-percent", "0") rconn.hset(str(jobid), "pheno-percent", "0") diff --git a/scripts/worker.py b/scripts/worker.py index 13556df..90d83c4 100644 --- a/scripts/worker.py +++ b/scripts/worker.py @@ -54,10 +54,14 @@ def run_job(job, rconn): rconn, job_id, process.stdout.read1(), "stdout") sleep(1) + update_status( + rconn, + job_id, + ("error" if process.returncode != 0 else "success")) + with open(stderrpath, "rb") as stderr: stderr_content = stderr.read() update_stdout_stderr(rconn, job_id, stderr_content, "stderr") - update_status(rconn, job_id, ("error" if bool(stderr_content) else "success")) os.remove(stderrpath) return process.poll() |