import functools

import ylock

from django.conf import settings
from ylock.decorators import locked as _locked

LOCK_TRANSACTION_TIMEOUT = 30  # sec

lock_manager = ylock.create_manager(**settings.YLOCK)
locked = functools.partial(_locked, manager=lock_manager, block=False)
