Skip to content

Commit

Permalink
Merge pull request #34 from wirenboard/feature/SOFT-4005
Browse files Browse the repository at this point in the history
Handle TimeoutExpired exception during events polling
  • Loading branch information
uninstallgentoo authored Jul 29, 2024
2 parents 0601947 + 520ff14 commit c6e307c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
wb-cloud-agent (1.5.6) stable; urgency=medium

* Handle TimeoutExpired exception during events polling
* Tweak curl params

-- Dmitry Fedichkin <[email protected]> Mon, 29 Jul 2024 12:31:17 +0200

wb-cloud-agent (1.5.5) stable; urgency=medium

* Fix preinst hook
Expand Down
6 changes: 4 additions & 2 deletions wb/cloud_agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit c6e307c

Please sign in to comment.