Skip to content

Commit

Permalink
fix(app.py): timeout reset
Browse files Browse the repository at this point in the history
reset timeout with dropback
  • Loading branch information
kshitijrajsharma committed Feb 10, 2025
1 parent e2843ed commit 245c62f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,7 @@ def get_osm_analytics_meta_stats(self):
MAX_RETRIES = 2 # Maximum number of retries
INITIAL_DELAY = 1 # Initial delay in seconds
MAX_DELAY = 8
API_TIMEOUT = 10

retries = 0
delay = INITIAL_DELAY
Expand All @@ -1071,7 +1072,9 @@ def get_osm_analytics_meta_stats(self):
try:
query = generate_polygon_stats_graphql_query(self.INPUT_GEOM)
payload = {"query": query}
response = requests.post(self.API_URL, json=payload, timeout=45)
response = requests.post(
self.API_URL, json=payload, timeout=API_TIMEOUT
)
response.raise_for_status()
return response.json()
except Exception as e:
Expand Down

0 comments on commit 245c62f

Please sign in to comment.