mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-10-10 21:26:01 +02:00
Fix sync DB engine (#32)
This commit is contained in:
@@ -10,6 +10,7 @@ from sqlalchemy.ext.asyncio import create_async_engine
|
|||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
|
|
||||||
|
SYNC_DB_API = "psycopg2"
|
||||||
ASYNC_DB_API = "asyncpg"
|
ASYNC_DB_API = "asyncpg"
|
||||||
# below are intended to match the env variables names used by the official
|
# below are intended to match the env variables names used by the official
|
||||||
# postgres docker image https://hub.docker.com/_/postgres
|
# postgres docker image https://hub.docker.com/_/postgres
|
||||||
@@ -33,7 +34,7 @@ def build_connection_string(
|
|||||||
|
|
||||||
|
|
||||||
def build_engine() -> Engine:
|
def build_engine() -> Engine:
|
||||||
connection_string = build_connection_string()
|
connection_string = build_connection_string(db_api=SYNC_DB_API)
|
||||||
return create_engine(connection_string)
|
return create_engine(connection_string)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -14,6 +14,8 @@ httpx-oauth==0.11.2
|
|||||||
Mako==1.2.4
|
Mako==1.2.4
|
||||||
openai==0.27.6
|
openai==0.27.6
|
||||||
playwright==1.32.1
|
playwright==1.32.1
|
||||||
|
psycopg2==2.9.6
|
||||||
|
psycopg2-binary==2.9.6
|
||||||
pydantic==1.10.7
|
pydantic==1.10.7
|
||||||
PyGithub==1.58.2
|
PyGithub==1.58.2
|
||||||
PyPDF2==3.0.1
|
PyPDF2==3.0.1
|
||||||
|
Reference in New Issue
Block a user