From cb1d104cdb76e1fa4ae47031642d47dff6fdf5dc Mon Sep 17 00:00:00 2001 From: Jesus Lara Date: Thu, 29 Jun 2023 16:13:08 +0200 Subject: [PATCH] change the default connection of AppHandler --- navigator/handlers/types.py | 4 ++-- navigator/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/navigator/handlers/types.py b/navigator/handlers/types.py index 0b3993de..6e6a718b 100644 --- a/navigator/handlers/types.py +++ b/navigator/handlers/types.py @@ -12,7 +12,7 @@ from navigator.middlewares.error import error_middleware from navigator.responses import JSONResponse from navigator.exceptions import ConfigError -from navigator.conf import APP_LOGNAME, asyncpg_url +from navigator.conf import APP_LOGNAME, default_dsn from .base import BaseHandler @@ -39,7 +39,7 @@ def __init__( try: # enable a pool-based database connection: if not self.dsn: - self.dsn = asyncpg_url + self.dsn = default_dsn pool = PostgresPool(name=APP_LOGNAME, dsn=self.dsn, startup=self.app_startup) pool.configure(self.app, register="database") # pylint: disable=E1123 except (ProviderError, DriverError) as ex: diff --git a/navigator/version.py b/navigator/version.py index c4e69c6c..39f5911d 100644 --- a/navigator/version.py +++ b/navigator/version.py @@ -4,7 +4,7 @@ __description__ = ( "Navigator Web Framework based on aiohttp, " "with batteries included." ) -__version__ = "2.6.24" +__version__ = "2.6.25" __author__ = "Jesus Lara" __author_email__ = "jesuslarag@gmail.com" __license__ = "BSD"