From ff8cbb6817bfa174e14cec0f24f264330fc41426 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Fri, 18 Nov 2022 23:06:34 +0100 Subject: fix lint I'm a slave to the linters now. --- fietsboek/views/tileproxy.py | 3 +-- 1 file changed, 1 insertion(+), 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) -- cgit v1.2.3