fixed up clusters
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m28s
Run linting on the backend code / Build (pull_request) Successful in 26s
Run testing on the backend code / Build (pull_request) Failing after 1m51s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 24s

This commit is contained in:
2025-01-23 10:33:32 +01:00
parent ca40de82dd
commit 78f1dcaab4
6 changed files with 105 additions and 84 deletions

View File

@@ -39,6 +39,8 @@ def build_query(area: tuple, element_types: ElementTypes, selector: str,
"""
if not isinstance(conditions, list) :
conditions = [conditions]
if not isinstance(element_types, list) :
element_types = [element_types]
query = '('
@@ -60,7 +62,7 @@ def build_query(area: tuple, element_types: ElementTypes, selector: str,
return query
def send_overpass_query(query: str, use_cache: bool = True) -> dict:
def send_overpass_query(query: str) -> dict:
"""
Sends the Overpass QL query to the Overpass API and returns the parsed JSON response.
@@ -76,7 +78,7 @@ def send_overpass_query(query: str, use_cache: bool = True) -> dict:
# Try to fetch the result from the cache
cached_response = CachingStrategy.get(cache_key)
if cached_response:
if cached_response is not None :
print("Cache hit!")
return cached_response