Explorar el Código

Apply wait time settings to HTTP calls

Nick Mills-Barrett hace 2 años
padre
commit
edf839087d
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 3 1
      mauigpapi/http/base.py
  2. 0 1
      mauigpapi/mqtt/conn.py

+ 3 - 1
mauigpapi/http/base.py

@@ -96,7 +96,9 @@ class BaseAndroidAPI:
             logger=self.log,
             proxy_handler=self.proxy_handler,
             on_proxy_change=self.on_proxy_update,
-            min_wait_seconds=1,  # we want to retry these pretty fast
+            # Wait 1s * errors, max 10s for fast failure
+            max_wait_seconds=10,
+            multiply_wait_seconds=1,
         )
 
     @staticmethod

+ 0 - 1
mauigpapi/mqtt/conn.py

@@ -625,7 +625,6 @@ class AndroidMQTT:
             max_retries=retry_limit,
             retryable_exceptions=(MQTTNotConnected, MQTTReconnectionError),
             # Wait 1s * errors, max 10s for fast reconnect or die
-            min_wait_seconds=0,
             max_wait_seconds=10,
             multiply_wait_seconds=1,
         )