Updated retry timeouts
This commit is contained in:
parent
c20f9572b9
commit
7d8f58cab7
2 changed files with 3 additions and 3 deletions
2
main.py
2
main.py
|
@ -70,7 +70,7 @@ def loadUrl(url):
|
||||||
|
|
||||||
headers = { 'User-Agent': 'Monutil monitor' }
|
headers = { 'User-Agent': 'Monutil monitor' }
|
||||||
|
|
||||||
@retry(stop_max_attempt_number=3)
|
@retry(stop_max_attempt_number=120, wait_fixed=1000)
|
||||||
def submitRequest(url):
|
def submitRequest(url):
|
||||||
|
|
||||||
response = requests.get(url, timeout=config.urlTimeout, headers=headers)
|
response = requests.get(url, timeout=config.urlTimeout, headers=headers)
|
||||||
|
|
|
@ -43,7 +43,7 @@ class rabbitMQClient:
|
||||||
|
|
||||||
def publish(self, message):
|
def publish(self, message):
|
||||||
|
|
||||||
@retry(stop_max_attempt_number=3)
|
@retry(stop_max_attempt_number=120, wait_fixed=1000)
|
||||||
def publishMessage(conn):
|
def publishMessage(conn):
|
||||||
|
|
||||||
ch = conn.channel()
|
ch = conn.channel()
|
||||||
|
@ -65,7 +65,7 @@ class rabbitMQClient:
|
||||||
|
|
||||||
publishMessage(conn)
|
publishMessage(conn)
|
||||||
|
|
||||||
@retry(stop_max_attempt_number=3)
|
@retry(stop_max_attempt_number=120, wait_fixed=1000)
|
||||||
def retrieve(self):
|
def retrieve(self):
|
||||||
|
|
||||||
def callback(ch, method, properties, body):
|
def callback(ch, method, properties, body):
|
||||||
|
|
Loading…
Reference in a new issue