fix(db): handle advisory lock row shape

This commit is contained in:
Brad Stein 2026-01-22 15:44:18 -03:00
parent 44c86e739d
commit 10b9d0aec6

View File

@ -67,7 +67,10 @@ class Database:
except Exception:
pass
row = conn.execute("SELECT pg_try_advisory_lock(%s)", (lock_id,)).fetchone()
locked = bool(row and row[0])
if isinstance(row, dict):
locked = bool(row.get("pg_try_advisory_lock"))
else:
locked = bool(row and row[0])
if not locked:
return
try: