From bdeaadf33fbcd473f1f1f22c24df32c712d57369 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Wed, 7 Dec 2016 16:37:23 +0100 Subject: [PATCH] Fix QPS: Compare everything in microseconds #317 --- .../lib/python/cartodb_services/cartodb_services/mapzen/qps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/python/cartodb_services/cartodb_services/mapzen/qps.py b/server/lib/python/cartodb_services/cartodb_services/mapzen/qps.py index 2c7101c..65569fb 100644 --- a/server/lib/python/cartodb_services/cartodb_services/mapzen/qps.py +++ b/server/lib/python/cartodb_services/cartodb_services/mapzen/qps.py @@ -55,7 +55,7 @@ class QPSService: def retry(self, first_request_time, retry_count): elapsed = datetime.now() - first_request_time - if elapsed.microseconds > (self._retry_timeout * 1000.0): + if elapsed.microseconds > (self._retry_timeout * 1000.0 * 1000.0): raise TimeoutException() # inverse qps * (1.5 ^ i) is an increased sleep time of 1.5x per