From 998c239c70f85c66694aac3e0b754881afb4758d Mon Sep 17 00:00:00 2001 From: Tomas Hulata Date: Tue, 15 Aug 2023 00:43:09 +0200 Subject: [PATCH] increase client side timeout --- prometheus_es_exporter/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prometheus_es_exporter/__init__.py b/prometheus_es_exporter/__init__.py index 74ee058..07cbce9 100644 --- a/prometheus_es_exporter/__init__.py +++ b/prometheus_es_exporter/__init__.py @@ -476,7 +476,7 @@ def updateConfigs(item): while True: try: log.info(f"Start listening for {customResource}") - for ev in watch.stream(customObjectsApi.list_cluster_custom_object, group, vers, customResource, timeout_seconds = 0, _request_timeout = 60): + for ev in watch.stream(customObjectsApi.list_cluster_custom_object, group, vers, customResource, timeout_seconds = 0, _request_timeout = (30, 24*3600)): item = ev["object"] namespace = item["metadata"]["namespace"] name = item["metadata"]["name"] @@ -590,7 +590,7 @@ def rolloverAlias(item): while True: try: log.info(f"Start listening for {customResource}") - for ev in watch.stream(customObjectsApi.list_cluster_custom_object, group, vers, customResource, timeout_seconds = 0, _request_timeout = 60): + for ev in watch.stream(customObjectsApi.list_cluster_custom_object, group, vers, customResource, timeout_seconds = 0, _request_timeout = (30, 24*3600)): item = ev['object'] item_resource_version = item['metadata']['resourceVersion'] templateName = item['spec']['templateName']