Skip to content

Commit ee93457

Browse files
committed
User self.release() method to release a connection while releasing a cursor
1 parent e4617ed commit ee93457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

peewee_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def release_cursor(self, cursor, in_transaction=False):
10111011
conn = cursor.connection
10121012
cursor.close()
10131013
if not in_transaction:
1014-
self.pool.release(conn)
1014+
self.release(conn)
10151015

10161016

10171017
class AsyncPostgresqlMixin(AsyncDatabase):
@@ -1170,7 +1170,7 @@ def release_cursor(self, cursor, in_transaction=False):
11701170
conn = cursor.connection
11711171
yield from cursor.close()
11721172
if not in_transaction:
1173-
self.pool.release(conn)
1173+
self.release(conn)
11741174

11751175

11761176
class MySQLDatabase(AsyncDatabase, peewee.MySQLDatabase):

0 commit comments

Comments
 (0)