Skip to content

Commit 6e44c53

Browse files
committed
switch the helper back to db.engine
1 parent 4396a9e commit 6e44c53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _advisory_lock_key(name: str) -> int:
2525
def _execute_with_advisory_lock(app, lock_name: str, target: Callable[[], None]) -> bool:
2626
"""Run ``target`` while holding a Postgres advisory lock for ``lock_name``."""
2727
try:
28-
engine = db.get_engine(app)
28+
engine = db.engine
2929
except RuntimeError:
3030
# Happens when no app is bound; fall back to running without locking.
3131
app.logger.warning(

0 commit comments

Comments
 (0)