Skip to content

Commit

Permalink
Serialize downloads on a worker
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Apr 9, 2024
1 parent 23ad8ee commit b7dfb20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray_ecmwf/engine_ecmwf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def retrieve(
if not os.path.isdir(self.cache_folder):
os.makedirs(self.cache_folder, exist_ok=True)

with xr.backends.locks.get_write_lock(f"{HOSTNAME}/{filename}"): # type: ignore
with xr.backends.locks.get_write_lock(f"{HOSTNAME}"): # type: ignore
if not os.path.exists(path):
robust_save_to_file(self.request_client.download, (result,), path)
ds = self.open_dataset(path)
Expand Down

0 comments on commit b7dfb20

Please sign in to comment.