Merge branch 'api-v1.8.2_for_upstream' into api-v1.8.2

This commit is contained in:
Taha Yassine Kraiem 2022-10-21 15:45:00 +02:00
commit 82da0e1234

View file

@ -141,6 +141,13 @@ class PostgresClient:
and not self.unlimited_query:
postgreSQL_pool.putconn(self.connection)
def recreate_cursor(self):
try:
self.cursor.close()
except Exception as error:
logging.error("Error while closing cursor for recreation", error)
self.cursor = self.connection.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
def close():
pass