11import asyncio
22
3- # noinspection PyPackageRequirements
43from quart import Quart , request
5- # noinspection PyPackageRequirements
64from quart .exceptions import NotFound
75from sqlalchemy .engine .url import URL
86
@@ -21,7 +19,6 @@ async def get_or_404(cls, *args, **kwargs):
2119 return rv
2220
2321
24- # noinspection PyClassHasNoInit
2522class GinoExecutor (_Executor ):
2623 async def first_or_404 (self , * args , ** kwargs ):
2724 rv = await self .first (* args , ** kwargs )
@@ -30,7 +27,6 @@ async def first_or_404(self, *args, **kwargs):
3027 return rv
3128
3229
33- # noinspection PyClassHasNoInit
3430class GinoConnection (_Connection ):
3531 async def first_or_404 (self , * args , ** kwargs ):
3632 rv = await self .first (* args , ** kwargs )
@@ -39,7 +35,6 @@ async def first_or_404(self, *args, **kwargs):
3935 return rv
4036
4137
42- # noinspection PyClassHasNoInit
4338class GinoEngine (_Engine ):
4439 connection_cls = GinoConnection
4540
@@ -119,6 +114,7 @@ async def before_first_request():
119114 echo = app .config .setdefault ('DB_ECHO' , False ),
120115 min_size = app .config .setdefault ('DB_POOL_MIN_SIZE' , 5 ),
121116 max_size = app .config .setdefault ('DB_POOL_MAX_SIZE' , 10 ),
117+ ssl = app .config .setdefault ('DB_SSL' ),
122118 loop = asyncio .get_event_loop (),
123119 )
124120
0 commit comments