bodhi: Only define consumer config for consumers.
Only hosts that have bodhi_message_routing_keys defined are message consumers, so let's only define the fedora-messaging consumer config settings if that variable is defined. Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
This commit is contained in:
parent
627e815c25
commit
cc0f79e999
1 changed files with 8 additions and 1 deletions
|
@ -9,7 +9,6 @@ topic_prefix = "org.fedoraproject.prod"
|
|||
publish_exchange = "amq.topic"
|
||||
passive_declares = false
|
||||
|
||||
callback = "bodhi.server.consumers:messaging_callback"
|
||||
|
||||
|
||||
[tls]
|
||||
|
@ -22,6 +21,9 @@ certfile = "/etc/fedora-messaging/bodhi-cert.pem"
|
|||
app = "bodhi"
|
||||
|
||||
|
||||
## If bodhi_message_routing_keys is defined, this must be a consumer so let's also set up the consumer
|
||||
## config.
|
||||
{% if bodhi_message_routing_keys %}
|
||||
[queues."bodhi{{ env_suffix }}"]
|
||||
durable = true
|
||||
auto_delete = false
|
||||
|
@ -38,6 +40,8 @@ routing_keys = [
|
|||
{% endfor %}
|
||||
]
|
||||
|
||||
callback = "bodhi.server.consumers:messaging_callback"
|
||||
|
||||
|
||||
[log_config]
|
||||
version = 1
|
||||
|
@ -105,3 +109,6 @@ handlers = ["console", "email"]
|
|||
[log_config.root]
|
||||
level = "ERROR"
|
||||
handlers = ["console", "email"]
|
||||
|
||||
## End consumer config if statement
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue