From 94b05fc86c008781bf9923b72dddda2d8d5c800e Mon Sep 17 00:00:00 2001 From: Alessandro Amici Date: Wed, 3 Apr 2024 19:51:25 +0200 Subject: [PATCH] Do not lock by default --- xarray_ecmwf/client_polytope.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xarray_ecmwf/client_polytope.py b/xarray_ecmwf/client_polytope.py index b8d559e..2b5c278 100644 --- a/xarray_ecmwf/client_polytope.py +++ b/xarray_ecmwf/client_polytope.py @@ -1,3 +1,4 @@ +import contextlib import hashlib import logging import os @@ -5,7 +6,6 @@ import attrs import polytope.api -import xarray as xr LOGGER = logging.getLogger(__name__) @@ -15,8 +15,8 @@ @attrs.define class PolytopeRequestClient: client_kwargs: dict[str, Any] = {} - retrieve_lock = xr.backends.locks.get_write_lock("polytope-retrieve") # type: ignore - download_lock = xr.backends.locks.get_write_lock("polytope-downlaod") # type: ignore + retrieve_lock = contextlib.nullcontext + download_lock = contextlib.nullcontext def submit_and_wait_on_result(self, request: dict[str, Any]) -> Any: path = hashlib.md5(str(request).encode("utf-8")).hexdigest() + ".grib"