Skip to content

Commit e514998

Browse files
committed
Fix sqlalchemy release_async() bug
1 parent 979dfd9 commit e514998

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ lock = Lock(conn, "shared-identifier", rollback_on_error=False)
175175

176176
### Changelog
177177

178+
- **0.1.9**
179+
- Fix: release_async() bug for sqlalchemy connections
178180
- **0.1.8**
179181
- Add logger() function
180182
- Use "postgresql_lock" logger name

postgresql_lock/sqlalchemy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,4 @@ async def release_async(lock: Lock) -> bool:
125125

126126
logger().debug("Release statement for key: %s, %s", lock.key, unlock_stmt)
127127

128-
return (await lock.conn.execute(text(unlock_stmt))).scalar(0)
128+
return (await lock.conn.execute(text(unlock_stmt))).scalar()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "postgresql-lock"
3-
version = "0.1.8"
3+
version = "0.1.9"
44
description = "Lock mechanism implemented with PostgreSQL advisory locks."
55
license = "BSD-3-Clause"
66
authors = ["Sean Kerr <sean@code-box.org>"]

0 commit comments

Comments
 (0)