Skip to content

Commit

Permalink
Use fsync to explicitly wait for files to be written to mount. Open-E…
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileSonneveld committed Oct 10, 2024
1 parent 9bd83a9 commit bc23643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openeogeotrellis/deploy/batch_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ def run_job(
finally:
write_metadata({**result_metadata, **_get_tracker_metadata("")}, metadata_file, job_dir)

# Wait for files to be written to mount:
os.fsync(os.open(job_dir, os.O_RDONLY))

def write_metadata(metadata, metadata_file, job_dir):
with open(metadata_file, 'w') as f:
Expand Down

0 comments on commit bc23643

Please sign in to comment.