Files
fedora-infra_ansible/roles/fedmsg/base/templates/endpoints.py.j2
Stephen Smoogen a6d987bc9e Remove more 'safe' entries from fedmsg endpoints to try and cut down
the noise of broken links in the system. Still not sure why some
things are supposed to fire up 8 processes but only 2 show up
2020-07-22 15:18:27 -04:00

48 lines
1.6 KiB
Django/Jinja

{% if datacenter == 'iad2' %}
{% if env == 'staging' %}
suffix = 'stg.iad2.fedoraproject.org'
{% else %}
suffix = 'iad2.fedoraproject.org'
vpn_suffix = 'vpn.fedoraproject.org'
{% endif %}
{% else %}
{% if env == 'staging' %}
suffix = 'stg.fedoraproject.org'
{% else %}
suffix = 'fedoraproject.org'
vpn_suffix = 'vpn.fedoraproject.org'
{% endif %}
{% endif %}
config = dict(
# This is a dict of possible addresses from which fedmsg can send
# messages. fedmsg.init(...) requires that a 'name' argument be passed
# to it which corresponds with one of the keys in this dict.
endpoints = {
# For message producers, fedmsg will try to guess the
# name of it's calling module to determine which endpoint definition
# to use. This can be overridden by explicitly providing the name in
# the initial call to fedmsg.init(...).
# This used to be on value01 and value03.. but now we just have one
"supybot.value01": [
"tcp://value01.%s:3000" % suffix,
],
# koji is not listed here since it publishes to the fedmsg-relay
# Dynamically generate endpoint declarations from our wsgi app vars.
# Eventually, replace *all* fedmsg endpoint definitions with this one loop
{% for host in groups['all']|sort %}
{% if 'wsgi_fedmsg_service' in hostvars[host] and env == hostvars[host]['env'] %}
"{{hostvars[host]['wsgi_fedmsg_service']}}.{{host.split('.')|first}}": [
{% for i in range(hostvars[host]['wsgi_procs'] * hostvars[host]['wsgi_threads']) %}
"tcp://{{host}}:30{{'%02d' % i}}",
{% endfor %}
],
{% endif %}
{% endfor %}
},
)