mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
mysql ping with reconnect
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user