Skip to content

Commit a320372

Browse files
committed
⚡ perf: use psycopg2.pool
1 parent 3f084e5 commit a320372

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

transpose/core/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
import sys
33

4-
import psycopg2
4+
from psycopg2 import pool as psycopg2_pool
55
from psycopg2.extras import RealDictCursor
66

77
from transpose.common.exceptions import InstanceConnectionError
@@ -23,7 +23,7 @@ def __init__(
2323

2424
# connect to the database
2525
try:
26-
pool = psycopg2.pool.ThreadedConnectionPool(
26+
pool = psycopg2_pool.ThreadedConnectionPool(
2727
1,
2828
20,
2929
host=host,

0 commit comments

Comments
 (0)