SAAS-56: RabbitMQ virtual host support
-Add support for specifying vhost in config files
This commit is contained in:
parent
2f1033ecb8
commit
21643a3734
9 changed files with 9 additions and 3 deletions
|
@ -39,6 +39,7 @@ ls_port = '1234'
|
|||
rabbitmq_host = 'localhost'
|
||||
rabbitmq_user = 'guest'
|
||||
rabbitmq_password = 'guest'
|
||||
rabbitmq_vhost = '/'
|
||||
|
||||
############################################
|
||||
# pypo preferences #
|
||||
|
|
|
@ -57,7 +57,7 @@ class PypoFetch(Thread):
|
|||
try:
|
||||
schedule_exchange = Exchange("airtime-pypo", "direct", durable=True, auto_delete=True)
|
||||
schedule_queue = Queue("pypo-fetch", exchange=schedule_exchange, key="foo")
|
||||
self.connection = BrokerConnection(config["rabbitmq_host"], config["rabbitmq_user"], config["rabbitmq_password"], "/")
|
||||
self.connection = BrokerConnection(config["rabbitmq_host"], config["rabbitmq_user"], config["rabbitmq_password"], config["rabbitmq_vhost"])
|
||||
channel = self.connection.channel()
|
||||
consumer = Consumer(channel, schedule_queue)
|
||||
consumer.register_callback(self.handle_message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue