Skip to content

Commit 9c1559e

Browse files
committed
Comment why we use a connection key
1 parent 6451192 commit 9c1559e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

addok_psql_store/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ def __init__(self, *args, **kwargs):
2323
curs.execute(create_index_query)
2424

2525
def getconn(self):
26+
# Use pid as connection id so we can reuse the connection within the
27+
# same process.
2628
return self.pool.getconn(key=os.getpid())
2729

2830
def fetch(self, *keys):

0 commit comments

Comments
 (0)