Skip to content

Commit

Permalink
use psycopg2 again for the non-async demo
Browse files Browse the repository at this point in the history
on second thought for the regular demo, we should
likely use psycopg2 for now, as the overhead of spinning
up an event loop on every DB call for "async_fallback"
is likely going to have a negative impact.
  • Loading branch information
zzzeek authored and elprans committed Mar 25, 2022
1 parent 02add2a commit 67407c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _sqlalchemy/queries.py
Expand Up @@ -24,8 +24,8 @@ def connect(ctx):

if session_factory is None:
engine = sa.create_engine(
f"postgresql+asyncpg://sqlalch_bench:edgedbbenchmark@"
f"{ctx.db_host}:{ctx.pg_port}/sqlalch_bench?async_fallback=true"
f"postgresql://sqlalch_bench:edgedbbenchmark@"
f"{ctx.db_host}:{ctx.pg_port}/sqlalch_bench"
)
session_factory = orm.sessionmaker(bind=engine, expire_on_commit=False)

Expand Down

0 comments on commit 67407c2

Please sign in to comment.