Skip to content

Commit

Permalink
Simplify write call
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Jan 13, 2025
1 parent 84885fd commit dcc820c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions aurora/foundry/common/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ def _mark(self, name: str) -> None:
with tempfile.TemporaryDirectory() as td:
mark_file_path = Path(td) / f"{name}.finished"
mark_file_path.parent.mkdir(exist_ok=True, parents=True)
# Write a few bytes to the file. Blob storage has behaved weirdly for empty files.
with open(mark_file_path, "wb") as f:
f.write(b"File is available")
mark_file_path.write_text("File is available")
self._azcopy(["copy", str(mark_file_path), self._blob_path(f"{name}.finished")])

def _is_marked(self, name: str) -> bool:
Expand Down

0 comments on commit dcc820c

Please sign in to comment.