9 lines
149 B
Python
9 lines
149 B
Python
import contextlib
|
|
|
|
from app.storage import redis
|
|
|
|
|
|
@contextlib.contextmanager
|
|
def acquire(lock_name: str):
|
|
return redis.database.lock(lock_name)
|