mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix maria engine to correctly recognize deadlocks
This commit is contained in:
parent
d5e7e6b9b6
commit
24d8134ac1
@ -42,6 +42,6 @@ class MariaEngine(object):
|
||||
prepare_database(db_conn, self)
|
||||
|
||||
def is_deadlock(self, error):
|
||||
if isinstance(error, self.module.InternalError):
|
||||
return error.sqlstate == 40001 and error.errno == 1213
|
||||
if isinstance(error, self.module.DatabaseError):
|
||||
return error.sqlstate == "40001" and error.errno == 1213
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user