Increase default retry count and timeout for python scripts

Frequent 'update data' workflow failures were observed lately, some due to timeout while fetching URLs.
This commit is contained in:
Marc Wrobel
2023-08-01 22:37:39 +02:00
parent 532c6d8bc2
commit 4aa7047fe1

View File

@@ -31,7 +31,7 @@ def list_products(method, products_filter=None, pathname="website/products"):
return products_with_method
def fetch_url(url, retry_count=2, timeout=5, data=None, headers=None, encoding='utf-8'):
def fetch_url(url, retry_count=5, timeout=10, data=None, headers=None, encoding='utf-8'):
last_exception = None
headers = {'User-Agent': USER_AGENT} | {} if headers is None else headers