Skip to content

Commit

Permalink
Switch back to psycopg2 from pg8000.
Browse files Browse the repository at this point in the history
  • Loading branch information
pwei1018 committed Sep 20, 2024
1 parent 458939f commit a27d537
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion auth-api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-api/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "auth-api"
version = "3.0.2"
version = "3.0.3"
description = ""
authors = ["\"BC Registries and Online Services\""]
readme = "README.md"
Expand Down
4 changes: 1 addition & 3 deletions auth-api/src/auth_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ class _Config: # pylint: disable=too-few-public-methods
DB_HOST = os.getenv("DATABASE_HOST", "")
DB_PORT = os.getenv("DATABASE_PORT", "5432")
if DB_UNIX_SOCKET := os.getenv("DATABASE_UNIX_SOCKET", None):
SQLALCHEMY_DATABASE_URI = (
f"postgresql+pg8000://{DB_USER}:{DB_PASSWORD}@/{DB_NAME}?unix_sock={DB_UNIX_SOCKET}/.s.PGSQL.5432"
)
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{DB_USER}:{DB_PASSWORD}@{DB_UNIX_SOCKET}"
else:
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{int(DB_PORT)}/{DB_NAME}"

Expand Down

0 comments on commit a27d537

Please sign in to comment.