Skip to content

Commit

Permalink
Merge pull request #563 from opensafely-core/fix-windows-file-bullshi…
Browse files Browse the repository at this point in the history
…t-again

fix: workaround windows filesystem, again
  • Loading branch information
bloodearnest authored Jan 26, 2023
2 parents e659124 + bce0461 commit 0cda301
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jobrunner/executors/volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ def delete_volume(job):
docker.delete_volume(docker_volume_name(job))

def write_timestamp(job, path, timeout=None):
with tempfile.NamedTemporaryFile() as f:
with tempfile.NamedTemporaryFile("w") as f:
f.write(str(time.time_ns()))
f.flush()
p = Path(f.name)
p.write_text(str(time.time_ns()))
docker.copy_to_volume(docker_volume_name(job), p, path, timeout)

def read_timestamp(job, path, timeout=None):
Expand Down

0 comments on commit 0cda301

Please sign in to comment.