aboutsummaryrefslogtreecommitdiff
path: root/scripts/worker.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-22 08:54:29 +0300
committerFrederick Muriuki Muriithi2024-01-22 08:54:29 +0300
commitf875926183e2e26881c3288e2f5c3d8ffe6397b8 (patch)
tree9e1ceb14a61bd5e6351ff5ed706fd3c02e7270bc /scripts/worker.py
parentcdd4dc456e56bb4eb055e1cb7f2518d45fb3bfb9 (diff)
downloadgn-uploader-f875926183e2e26881c3288e2f5c3d8ffe6397b8.tar.gz
UI: Show progress of R/qtl2 bundle processing.
Diffstat (limited to 'scripts/worker.py')
-rw-r--r--scripts/worker.py6
1 files changed, 5 insertions, 1 deletions
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()