Skip to content

Commit

Permalink
Do not lock by default
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Apr 3, 2024
1 parent f2d90a4 commit 94b05fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray_ecmwf/client_polytope.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import contextlib
import hashlib
import logging
import os
from typing import Any

import attrs
import polytope.api
import xarray as xr

LOGGER = logging.getLogger(__name__)

Expand All @@ -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"
Expand Down

0 comments on commit 94b05fc

Please sign in to comment.