From 9610dac1301f7611e1f10d6f6bc3eb3a252fc9b8 Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Wed, 9 Sep 2015 08:25:00 -0400 Subject: [PATCH] mysql ping with reconnect --- poller-service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/poller-service.py b/poller-service.py index a11064e3f..61dcc84cf 100755 --- a/poller-service.py +++ b/poller-service.py @@ -58,6 +58,7 @@ class DB: else: self.conn = MySQLdb.connect(host=db_server, port=db_port, user=db_username, passwd=db_password, db=db_dbname) self.conn.autocommit(True) + self.conn.ping(True) def query(self, sql): try: