Skip to content

Commit

Permalink
try fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
zcemycl committed Nov 7, 2023
1 parent 8048cfa commit 6049e5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.pgvector
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN make install

FROM postgres:14.4-alpine
COPY ./src/sql/init.sql /docker-entrypoint-initdb.d/
COPY ./src/docker/postgres/postgresql.conf /var/lib/postgresql/data/
# COPY ./src/docker/postgres/postgresql.conf /var/lib/postgresql/data/
COPY --from=pgvector-builder /usr/local/lib/postgresql/bitcode/vector.index.bc /usr/local/lib/postgresql/bitcode/vector.index.bc
COPY --from=pgvector-builder /usr/local/lib/postgresql/vector.so /usr/local/lib/postgresql/vector.so
COPY --from=pgvector-builder /usr/local/share/postgresql/extension /usr/local/share/postgresql/extension
11 changes: 10 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ def event_loop() -> asyncio.AbstractEventLoop:
@pytest.fixture(autouse=True)
def get_engine_orm() -> AsyncEngine:
db_url = "postgresql+asyncpg://postgres:postgres@localhost/postgres"
engine = create_async_engine(db_url)
engine = create_async_engine(
db_url,
connect_args={
"server_settings": {
"tcp_keepalives_idle": "600",
"tcp_keepalives_interval": "30",
"tcp_keepalives_count": "10",
}
},
)

yield engine
engine.sync_engine.dispose()
Expand Down

0 comments on commit 6049e5e

Please sign in to comment.