From 8a6079d063f8e36c6d2663a1c846763c96e7820b Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Aug 14 2018 21:49:18 +0000 Subject: If rhmsg fails with a RuntimeError, then retry. I saw this in the logs during the last possible part of an event, causing the whole event to fail. This will at least let us ride out 2-minute UMB blips. --- diff --git a/freshmaker/messaging.py b/freshmaker/messaging.py index 8c4b290..2e5a5a2 100644 --- a/freshmaker/messaging.py +++ b/freshmaker/messaging.py @@ -29,6 +29,7 @@ import json from freshmaker import log, conf from freshmaker.events import BaseEvent +from freshmaker.utils import retry def publish(topic, msg): @@ -53,6 +54,7 @@ def _fedmsg_publish(topic, msg): return fedmsg.publish(topic, msg=msg, modname=config['SERVICE']) +@retry(wait_on=(RuntimeError,), logger=log) def _rhmsg_publish(topic, msg): """Send message to Unified Message Bus