From d18578988290db6c5af26fcb0147fd0ba0c0e93d Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Tue, 12 Dec 2023 15:55:49 -0500 Subject: [PATCH] Improved output and fixed bug with not expanding ~ in filenames. --- HISTORY.rst | 3 +++ seamm_jobserver/jobserver.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 8b66655..b998b88 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,9 @@ ======= History ======= +2023.12.12 -- Improved the output in the GUI. + * Improved the output to the GUI + * Fixed a bug in the file path for the status file. 2023.3.23 -- Substantial improvements to JobServer * Switched to independent process for Jobs, which means they are fully independent of diff --git a/seamm_jobserver/jobserver.py b/seamm_jobserver/jobserver.py index 7f8b976..656d87d 100644 --- a/seamm_jobserver/jobserver.py +++ b/seamm_jobserver/jobserver.py @@ -156,12 +156,16 @@ def check_for_finished_jobs(self): except Exception: status = "unknown" self.logger.debug(f"Job {job_id} finished, code={status}.") - self.logger.info(f"Job {job_id} finished (pid={pid}).") if status == 0: + self.logger.info(f"Job {job_id} finished successfully ({pid=}).") self.successful_jobs += 1 elif status == "unknown": + self.logger.info( + f"Job {job_id} finished with unknown status ({pid=})." + ) self.ended_jobs += 1 else: + self.logger.info(f"Job {job_id} failed ({pid=} {status=}).") self.failed_jobs += 1 for job_id in finished: del self._jobs[job_id] @@ -408,6 +412,7 @@ def gui_status_loop(self): status_file = self.options["status_file"] if status_file != "none": + status_file = Path(status_file).expanduser() with open(status_file, "w") as fd: json.dump(status, fd, indent=4)