--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -204,6 +204,15 @@
password=config.get('amqp.password', 'testpw'),
virtual_host=config.get('amqp.vhost', 'testvhost'))
return environ['allura.carrot.connection']
+
+ def amqp_reconnect(self):
+ from .custom_middleware import environ
+ try:
+ self.conn.close()
+ except:
+ log.exception('Error closing amqp connection')
+ del environ['allura.carrot.connection']
+ self.conn
def oid_session(self):
if 'openid_info' in session: