Add timeout to requests calls

This commit is contained in:
pixeebot[bot]
2025-01-28 03:09:49 +00:00
committed by GitHub
parent 7aa706d12a
commit 96857ad1d4
8 changed files with 14 additions and 14 deletions

View File

@@ -79,7 +79,7 @@ def location_search(request: HttpRequest) -> JsonResponse:
"limit": 10,
},
headers={"User-Agent": "ThrillWiki/1.0"},
)
timeout=60)
if response.status_code == 200:
results = response.json()
@@ -128,7 +128,7 @@ def reverse_geocode(request: HttpRequest) -> JsonResponse:
"accept-language": "en",
},
headers={"User-Agent": "ThrillWiki/1.0"},
)
timeout=60)
if response.status_code == 200:
result = response.json()