Skip to content

Commit

Permalink
fix on order of operations
Browse files Browse the repository at this point in the history
  • Loading branch information
HansVRP committed Jan 22, 2025
1 parent 90e5f8a commit 7643cc4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions openeo/extra/job_management/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,13 +630,14 @@ def on_job_done(self, job: BatchJob, row):
# TODO: param `row` is never accessed in this method. Remove it? Is this intended for future use?

job_metadata = job.describe()
job_dir = self.get_job_dir(job.job_id)
self.ensure_job_dir_exists(job.job_id)
metadata_path = self.get_job_metadata_path(job.job_id)
with metadata_path.open("w", encoding="utf-8") as f:
json.dump(job_metadata, f, ensure_ascii=False)

if self._download:
job_dir = self.get_job_dir(job.job_id)
self.ensure_job_dir_exists(job.job_id)
with metadata_path.open("w", encoding="utf-8") as f:
json.dump(job_metadata, f, ensure_ascii=False)

job.get_results().download_files(target=job_dir)


Expand Down

0 comments on commit 7643cc4

Please sign in to comment.