aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2022-11-18 23:06:34 +0100
committerDaniel Schadt <kingdread@gmx.de>2022-11-18 23:06:34 +0100
commitff8cbb6817bfa174e14cec0f24f264330fc41426 (patch)
treeeca75c85988a732ff7d7eeb3888495d292e41c11
parentbfda955e95d4bac178ee61205bd626d188bde457 (diff)
downloadfietsboek-ff8cbb6817bfa174e14cec0f24f264330fc41426.tar.gz
fietsboek-ff8cbb6817bfa174e14cec0f24f264330fc41426.tar.bz2
fietsboek-ff8cbb6817bfa174e14cec0f24f264330fc41426.zip
fix lint
I'm a slave to the linters now.
-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)