Set the priority in the fedora-messaging notifier
According to [infra ticket #10899](https://pagure.io/fedora-infrastructure/issue/10899), ostree messages should have prioriy 3. Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
e9d836c115
commit
b8b6b46ce7
@ -14,6 +14,9 @@ def send(cmd, data):
|
|||||||
topic = "compose.%s" % cmd.replace("-", ".").lower()
|
topic = "compose.%s" % cmd.replace("-", ".").lower()
|
||||||
try:
|
try:
|
||||||
msg = fedora_messaging.api.Message(topic="pungi.{}".format(topic), body=data)
|
msg = fedora_messaging.api.Message(topic="pungi.{}".format(topic), body=data)
|
||||||
|
if cmd == "ostree":
|
||||||
|
# https://pagure.io/fedora-infrastructure/issue/10899
|
||||||
|
msg.priority = 3
|
||||||
fedora_messaging.api.publish(msg)
|
fedora_messaging.api.publish(msg)
|
||||||
except fedora_messaging.exceptions.PublishReturned as e:
|
except fedora_messaging.exceptions.PublishReturned as e:
|
||||||
print("Fedora Messaging broker rejected message %s: %s" % (msg.id, e))
|
print("Fedora Messaging broker rejected message %s: %s" % (msg.id, e))
|
||||||
|
Loading…
Reference in New Issue
Block a user