Skip to content

Commit

Permalink
change the default connection of AppHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
phenobarbital committed Jun 29, 2023
1 parent 0fe1a31 commit cb1d104
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions navigator/handlers/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion navigator/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit cb1d104

Please sign in to comment.