Skip to content
Snippets Groups Projects
Commit 64e825fe authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8887: More minor bugfixes

parent a0cd2068
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ if __name__ == '__main__':
if (options.broker==None):
parser.print_help()
sys.exit(1)
else:
QPIDinfra.addhost(options.broker)
......@@ -49,7 +50,7 @@ if __name__ == '__main__':
exchange=options.exchange
QPIDinfra.bindqueuetohost(options.queue,options.federation)
QPIDinfra.setqueueroute(options.queue,options.broker,options.federation,exchange)
QPIDinfra.setqueueroute(options.queue,options.broker,options.federation,options.exchange)
else:
if (options.exchange):
QPIDinfra.addexchange(options.exchange) # should be superfluous
......
......@@ -225,7 +225,7 @@ class qpidinfra:
If dynamic is set to True the routing key won't have any effect since teh routing is assumed dynamic.
"""
if (self.getexchangeroute(exchangeid,routingkey,fromid,toid)==0):
self.db.docommit("insert into exchangeroutes (eid,fromhost,tohost,routingkey,dynamic);" %(exchangeid,fromid,toid,routingkey,dynamic))
self.db.docommit("insert into exchangeroutes (eid,fromhost,tohost,routingkey,dynamic) values (%s, %s, %s, '%s', %s);" %(exchangeid,fromid,toid,routingkey,dynamic))
def delexchangeroute(self,exchangeid,routingkey,fromid,toid,dynamic=False):
""" Delete the exchange route for exchangeid,routingkey,fromid,toid and dynamic(bool).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment