Loading back/myfab/model.py +5 −1 Original line number Diff line number Diff line Loading @@ -13,9 +13,13 @@ from peewee import ( import datetime import sys, os import myfab.log as log import playhouse.shortcuts.ReconnectMixin CONNECTION = None class ReconnectMySQLDatabase(ReconnectMixin, MySQLDatabase): pass def create_mysql_connection() -> MySQLDatabase: global CONNECTION Loading @@ -30,7 +34,7 @@ def create_mysql_connection() -> MySQLDatabase: url = os.environ["MYSQL_HOST"] log.info("Using MYSQL_HOST %s" % url) return MySQLDatabase( return ReconnectMySQLDatabase( os.environ["MYSQL_DB"], user=os.environ["MYSQL_USER"], host=url, Loading back/requirements.txt +2 −1 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ flask_jwt_extended flask-cors flask_api requests playhouse No newline at end of file Loading
back/myfab/model.py +5 −1 Original line number Diff line number Diff line Loading @@ -13,9 +13,13 @@ from peewee import ( import datetime import sys, os import myfab.log as log import playhouse.shortcuts.ReconnectMixin CONNECTION = None class ReconnectMySQLDatabase(ReconnectMixin, MySQLDatabase): pass def create_mysql_connection() -> MySQLDatabase: global CONNECTION Loading @@ -30,7 +34,7 @@ def create_mysql_connection() -> MySQLDatabase: url = os.environ["MYSQL_HOST"] log.info("Using MYSQL_HOST %s" % url) return MySQLDatabase( return ReconnectMySQLDatabase( os.environ["MYSQL_DB"], user=os.environ["MYSQL_USER"], host=url, Loading
back/requirements.txt +2 −1 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ flask_jwt_extended flask-cors flask_api requests playhouse No newline at end of file