Upgrade pip packages

This commit is contained in:
Ryan Ahearn
2022-08-12 15:37:39 +00:00
parent 2597011cee
commit a6669501cc
3 changed files with 13 additions and 11 deletions

View File

@@ -41,12 +41,13 @@ class SQLAlchemy(_SQLAlchemy):
"""We need to subclass SQLAlchemy in order to override create_engine options"""
def apply_driver_hacks(self, app, info, options):
super().apply_driver_hacks(app, info, options)
sa_url, options = super().apply_driver_hacks(app, info, options)
if 'connect_args' not in options:
options['connect_args'] = {}
options['connect_args']["options"] = "-c statement_timeout={}".format(
int(app.config['SQLALCHEMY_STATEMENT_TIMEOUT']) * 1000
)
return (sa_url, options)
db = SQLAlchemy()