From f875926183e2e26881c3288e2f5c3d8ffe6397b8 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 22 Jan 2024 08:54:29 +0300 Subject: UI: Show progress of R/qtl2 bundle processing. --- scripts/process_rqtl2_bundle.py | 1 - scripts/worker.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') 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() -- cgit v1.2.3