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/worker.py | |
parent | cdd4dc456e56bb4eb055e1cb7f2518d45fb3bfb9 (diff) | |
download | gn-uploader-f875926183e2e26881c3288e2f5c3d8ffe6397b8.tar.gz |
UI: Show progress of R/qtl2 bundle processing.
Diffstat (limited to 'scripts/worker.py')
-rw-r--r-- | scripts/worker.py | 6 |
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() |