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
I need additional checks before retry code, for instance:
defis_sql_exception_for_retry(exc: t_sql_errors):
# sqlalchemy.exc.OperationalError# (psycopg2.OperationalError) server closed the connection unexpectedly# (psycopg2.OperationalError) could not connect to server: Connection refusedmessage=exc._message()
if"server closed the connection unexpectedly"inmessage:
returnTrueif"could not connect to server: Connection refused"inmessage:
returnTruereturnFalse
Hello,
I need additional checks before retry code, for instance:
In my case I can do only:
I will be great to add to functional callback for retry.
Also I can define specific retry exception, check my function is_sql_exception_for_retry in retriable function and raise created exception, like this:
but in this case I will lose convenience of decorator, and will have additional code in each retriable function.
The text was updated successfully, but these errors were encountered: