You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need add to callback to PoolBackend to check connection like in pyscopg3
Some useful snippets:
psycopg3 check connection method:
@staticmethoddefcheck_connection(conn: CT) ->None:
""" A simple check to verify that a connection is still working. Return quietly if the connection is still working, otherwise raise an exception. Used internally by `check()`, but also available for client usage, for instance as `!check` callback when a pool is created. """ifconn.autocommit:
conn.execute("")
else:
conn.autocommit=Truetry:
conn.execute("")
finally:
conn.autocommit=False
Some implementation of healthcheck for peewee-async
We need add to callback to PoolBackend to check connection like in pyscopg3
Some useful snippets:
psycopg3 check connection method:
Some implementation of healthcheck for peewee-async
The text was updated successfully, but these errors were encountered: