Skip to content

Commit

Permalink
Implement review comment to error with unknown vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Dec 18, 2024
1 parent 816a2a8 commit b45ab06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ansible_base/lib/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,7 @@ def advisory_lock(*args, lock_session_timeout_milliseconds=0, **kwargs):
with connection.cursor() as cur:
cur.execute("SET idle_in_transaction_session_timeout = %s", (idle_in_transaction_session_timeout,))
cur.execute("SET idle_session_timeout = %s", (idle_session_timeout,))
else:
elif connection.vendor == "sqlite":
yield True
else:
raise RuntimeError(f'Advisory lock not implemented for database type {connection.vendor}')

0 comments on commit b45ab06

Please sign in to comment.