aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/views/tileproxy.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/fietsboek/views/tileproxy.py b/fietsboek/views/tileproxy.py
index cbd84f0..1c8a054 100644
--- a/fietsboek/views/tileproxy.py
+++ b/fietsboek/views/tileproxy.py
@@ -208,8 +208,7 @@ def tile_proxy(request):
return Response(cached, content_type=content_type)
timeout_tracker = f"provider-timeout:{provider}"
- previous_timeouts = int(request.redis.get(timeout_tracker) or "0")
- if previous_timeouts > PUNISHMENT_THRESHOLD:
+ if int(request.redis.get(timeout_tracker) or "0") > PUNISHMENT_THRESHOLD:
# We've gotten too many timeouts from this provider recently, so avoid
# contacting it in the first place.
LOGGER.debug("Aborted attempt to contact %s due to previous timeouts", provider)