Merge "Fix db reconnect issue under django 1.6+" into stable

This commit is contained in:
Jenkins 2014-09-16 20:52:22 +00:00 committed by Gerrit Code Review
commit e40f3edda6

View File

@ -35,6 +35,7 @@ except ImportError:
from pympler.process import ProcessMemoryInfo
from django.db import connection as db_connection
from stacktach import db
from stacktach import message_service
from stacktach import stacklog
@ -171,6 +172,8 @@ def continue_running():
def exit_or_sleep(exit=False):
if exit:
sys.exit(1)
#so django 1.6+ will properly reconnect
db_connection.close()
time.sleep(5)