Commit 211a3a64 authored by Federico Sismondi's avatar Federico Sismondi
Browse files

delete queue on exit

parent a83dbaee
......@@ -80,6 +80,7 @@ def bootstrap(amqp_url, amqp_exchange, agent_id, ipv6_host, ipv6_prefix, ipv6_no
queue=callback_queue,
routing_key='control.tun.fromAgent.%s' % agent_id)
try:
for i in range(1, 4):
logging.debug("Let's start the bootstrap the agent %s try number %d" % (agent_id, i))
publish_tun_start(amqp_exchange, channel, agent_id, ipv6_host, ipv6_prefix, ipv6_no_forwarding)
......@@ -92,6 +93,10 @@ def bootstrap(amqp_url, amqp_exchange, agent_id, ipv6_host, ipv6_prefix, ipv6_no
pass
else:
logging.error("Agent tun bootstrapping mechanism not working, check that the agent was launched correctly")
except Exception as e:
logging.error("Agent tun bootstrapping mechanism not working, exception %" %e)
finally:
channel.queue_delete(agent_event_q)
if __name__ == "__main__":
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment