mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 09:53:59 +00:00
MySQL: add connection timeout for bad hosts
This commit is contained in:
parent
5b54a777d9
commit
234edd339c
@ -137,7 +137,8 @@ class Mysql(BaseSQLQueryRunner):
|
||||
db=self.configuration['db'],
|
||||
port=self.configuration.get('port', 3306),
|
||||
charset='utf8', use_unicode=True,
|
||||
ssl=self._get_ssl_parameters())
|
||||
ssl=self._get_ssl_parameters(),
|
||||
connect_timeout=60)
|
||||
cursor = connection.cursor()
|
||||
logger.debug("MySQL running query: %s", query)
|
||||
cursor.execute(query)
|
||||
|
Loading…
Reference in New Issue
Block a user