From 3f3de13f7a374cbf58ae599ddd67c44e94e840af Mon Sep 17 00:00:00 2001 From: Alex Russell Date: Mon, 3 Aug 2026 08:36:39 +0200 Subject: [PATCH] fix(worker): stop calling every probe a startup probe in the log Caught on the live agent minutes after deploying 0.4.0: a probe triggered by the cmd topic logged 'startup probe: printer did not answer', which reads as though the service had just restarted. An operator tailing the journal would go looking for a crash. Same staleness as the docstring fixed in #14 and from the same cause -- the message was written when startup was the only caller, and #14 added two more. Dropped the qualifier rather than threading the trigger through, since the line is about the printer not answering and which caller asked adds nothing to that. --- src/labelfab/agent/worker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/labelfab/agent/worker.py b/src/labelfab/agent/worker.py index fea50ea..c57cce7 100644 --- a/src/labelfab/agent/worker.py +++ b/src/labelfab/agent/worker.py @@ -43,8 +43,8 @@ #: Backoff between reconnect attempts within one send, in seconds. _BACKOFF_S = (1.0, 3.0, 9.0) -#: How long the startup probe waits for the printer's replies to arrive on the -#: transport's reader thread before reading them. +#: How long a probe waits for the printer's replies to arrive on the transport's +#: reader thread before reading them. _PROBE_SETTLE_S = 1.0 @@ -312,11 +312,11 @@ def probe_device(self) -> bool: printer.refresh_telemetry() except D30Error as exc: printer.close() - log.info("startup probe: printer did not answer (%s); keeping the stored status", exc) + log.info("probe: printer did not answer (%s); keeping the stored status", exc) return False except Exception: # a status nicety must never be what stops the agent starting printer.close() - log.exception("startup probe failed; keeping the stored status") + log.exception("probe failed; keeping the stored status") return False # Replies land asynchronously on the transport's reader thread, and unlike the # print path there is no print duration to cover the wait. Settling short is