mysql keepalive

This commit is contained in:
dave 2019-06-02 11:55:47 -07:00
parent 28e36259a5
commit 7ecb13fc25

View File

@ -52,6 +52,7 @@ class SATool(cherrypy.Tool):
def bind_session(self):
cherrypy.engine.publish('bind', self.session)
cherrypy.request.db = self.session
cherrypy.request.db.connection().connection.connection.ping()
def commit_transaction(self):
cherrypy.request.db = None