diff --git a/debian/changelog b/debian/changelog index 96ae439..b49aa6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +wb-cloud-agent (1.5.6) stable; urgency=medium + + * Handle TimeoutExpired exception during events polling + * Tweak curl params + + -- Dmitry Fedichkin Mon, 29 Jul 2024 12:31:17 +0200 + wb-cloud-agent (1.5.5) stable; urgency=medium * Fix preinst hook diff --git a/wb/cloud_agent/main.py b/wb/cloud_agent/main.py index 2ac7c54..c50b75d 100644 --- a/wb/cloud_agent/main.py +++ b/wb/cloud_agent/main.py @@ -137,8 +137,8 @@ def do_curl(settings: AppSettings, method="get", endpoint="", params=None): "45", "--retry", "8", - "--retry-max-time", - "300", + "--retry-delay", + "1", "--retry-all-errors", "--cert", settings.CLIENT_CERT_FILE, @@ -447,6 +447,8 @@ def run_daemon(mqtt, settings): start = time.perf_counter() try: make_event_request(settings, mqtt) + except subprocess.TimeoutExpired: + continue except Exception as ex: logging.exception("Error making request to cloud!") publish_ctrl(settings, mqtt, "status", "error: " + str(ex))