fix(db): handle advisory lock row shape
This commit is contained in:
parent
44c86e739d
commit
10b9d0aec6
@ -67,6 +67,9 @@ class Database:
|
||||
except Exception:
|
||||
pass
|
||||
row = conn.execute("SELECT pg_try_advisory_lock(%s)", (lock_id,)).fetchone()
|
||||
if isinstance(row, dict):
|
||||
locked = bool(row.get("pg_try_advisory_lock"))
|
||||
else:
|
||||
locked = bool(row and row[0])
|
||||
if not locked:
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user