From 14e760a144f13077daf748cdc71e1240b4cff1d0 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Fri, 15 May 2020 15:06:21 +0200 Subject: [PATCH] callback: specify which configuration file to use for fedora-messaging Signed-off-by: Pierre-Yves Chibon --- callback_plugins/fedora_messaging_callback.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/callback_plugins/fedora_messaging_callback.py b/callback_plugins/fedora_messaging_callback.py index 182ee7898d..84d8ed52ee 100644 --- a/callback_plugins/fedora_messaging_callback.py +++ b/callback_plugins/fedora_messaging_callback.py @@ -21,6 +21,7 @@ import logging import os import pwd +import fedora_messaging.config from fedora_messaging.api import Message, publish from fedora_messaging.exceptions import PublishReturned, ConnectionException @@ -52,6 +53,8 @@ class CallbackModule(CallbackBase): CALLBACK_TYPE = "notification" CALLBACK_VERSION = 2.0 CALLBACK_NEEDS_WHITELIST = True + fedora_messaging.config.conf.load_config( + '/etc/fedora-messaging/batcave-messaging.toml') playbook_path = None @@ -61,6 +64,7 @@ class CallbackModule(CallbackBase): super(CallbackModule, self).__init__() + def set_play_context(self, play_context): self.play_context = play_context