Make scripts to sync log files more robust

Previously, an expired certificate on log01 made sending messages out of
the scripts fail, which caused a couple days worth of lost logs.

Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
Nils Philippsen 2023-11-22 13:03:03 +01:00 committed by kevin
parent 85a53986e6
commit a95808355c
2 changed files with 11 additions and 2 deletions

View file

@ -37,7 +37,10 @@ log = logging.getLogger(__name__)
def send_bus_msg(topic, **kwargs):
msg = message.Message(topic=f"{MSGTOPIC_PREFIX}.{topic}", body=kwargs)
api.publish(msg)
try:
api.publish(msg)
except Exception as exc:
log.warning("Cant send message to the bus: %s, %s", msg, exc)
def send_sync_msg(topic, **kwargs):