diff options
author | Frederick Muriuki Muriithi | 2025-03-25 14:44:42 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-03-25 14:44:42 -0500 |
commit | 27425e6d57634106d2991ad17414d45c490c931c (patch) | |
tree | 34e48d2aaa70ce4c99397f37d9947102d57d9ad0 /gn_libs | |
parent | cbe2211a23e526936e523524259b39afa12c5f67 (diff) | |
download | gn-libs-27425e6d57634106d2991ad17414d45c490c931c.tar.gz |
Clean up after ourselves!
Diffstat (limited to 'gn_libs')
-rw-r--r-- | gn_libs/jobs/launcher.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gn_libs/jobs/launcher.py b/gn_libs/jobs/launcher.py index b7369a4..5edcd07 100644 --- a/gn_libs/jobs/launcher.py +++ b/gn_libs/jobs/launcher.py @@ -1,3 +1,4 @@ +import os import sys import time import shlex @@ -36,6 +37,10 @@ def run_job(conn, job, outputs_directory: Path): # Fetch any remaining content. jobs.push_to_stream(conn, job_id, "stdout", stdout_in.read()) jobs.push_to_stream(conn, job_id, "stderr", stderr_in.read()) + + os.remove(stdout_file) + os.remove(stderr_file) + return process.poll() except: jobs.update_metadata(conn, job_id, "status", "error") jobs.push_to_stream(conn, job_id, "stderr", traceback.format_exc()) |