Skip to content

Commit

Permalink
Improved output and fixed bug with not expanding ~ in filenames.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsaxe committed Dec 12, 2023
1 parent 1e9fa35 commit d185789
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion seamm_jobserver/jobserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit d185789

Please sign in to comment.