mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-04 05:38:57 +01:00
Correctly identify deadlocks
This commit is contained in:
parent
63677d1f47
commit
c756dfeb14
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class PostgresEngine(object):
|
||||||
|
|
||||||
def is_deadlock(self, error):
|
def is_deadlock(self, error):
|
||||||
if isinstance(error, self.module.DatabaseError):
|
if isinstance(error, self.module.DatabaseError):
|
||||||
return error.pgcode == "40P01"
|
return error.pgcode in ["40001", "40P01"]
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def load_unicode(self, v):
|
def load_unicode(self, v):
|
||||||
|
|
Loading…
Reference in a new issue