Skip to content

Commit

Permalink
snapshot uses job.jobpath
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKraus committed Apr 14, 2024
1 parent 48bb64f commit 7751b97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tomato/ketchup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,8 @@ def snapshot(
if jobs[jobid].status in {"q", "qw"}:
return Reply(success=False, msg=f"job {jobid} is still queued")

jobdir = Path(status.data.settings["jobs"]["storage"])
for jobid in jobids:
merge_netcdfs(jobdir / str(jobid), Path(f"snapshot.{jobid}.nc"))
merge_netcdfs(Path(jobs[jobid].jobpath), Path(f"snapshot.{jobid}.nc"))
return Reply(success=True, msg=f"snapshot for job(s) {jobids} created successfully")


Expand Down

0 comments on commit 7751b97

Please sign in to comment.