Skip to content

Commit

Permalink
update log lines to only log offline state locally
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickjaigner committed Oct 9, 2024
1 parent 44a4a2d commit 1a3ad63
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions edge-node/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _graceful_teardown(*_args: Any) -> None:
last_successful_mainloop_iteration_time = time.time()

except procedures.MQTTAgent.CommunicationOutage as e:
logger.exception(e, label="exception in mainloop", config=config)
logger.exception(e, label="exception in mainloop")

# cancel the alarm for too long mainloops
signal.alarm(0)
Expand Down Expand Up @@ -249,22 +249,13 @@ def _graceful_teardown(*_args: Any) -> None:
if time.time() > ebo.next_try_timer():
ebo.set_next_timer()
# try to establish mqtt connection
logger.info(
f"Restarting messaging agent.",
config=config,
)
logger.info(f"Restarting messaging agent.")
procedures.MQTTAgent.deinit()
procedures.MQTTAgent.init(config)
logger.info(
f"Successfully restarted messaging agent.",
config=config,
)
f"Performed attempt to restart messaging agent.")
except Exception as e:
logger.exception(
e,
label="Failed to restart messaging agent.",
config=config,
)
logger.exception(e, label="Failed to restart messaging agent.")

except Exception as e:
logger.exception(e, label="exception in mainloop", config=config)
Expand Down

0 comments on commit 1a3ad63

Please sign in to comment.