]> TLD Linux GIT Repositories - tld-builder.git/blob - TLD_Builder/messagebus.py
- merged PLD changes, now it works with python 3.x
[tld-builder.git] / TLD_Builder / messagebus.py
1 #!/usr/bin/python3
2 # I would name this file as fedmsg,
3 # but don't know how to import 'fedmsg' from system dir and from local dir
4
5 import fedmsg
6 import fedmsg.config
7
8 config = fedmsg.config.load_config([], None)
9 config['active'] = True
10 config['endpoints']['relay_inbound'] = config['relay_inbound']
11 fedmsg.init(name='relay_inbound', cert_prefix='builder', **config)
12
13 def notify(topic, **kwargs):
14     fedmsg.publish(
15         topic=topic,
16         msg=dict(kwargs),
17         modname="builder",
18     )