sqlalchemy_dlock.asyncio.lock.mysql module#
- class sqlalchemy_dlock.asyncio.lock.mysql.MysqlAsyncSadLock(connection_or_session: TAsyncConnectionOrSession, key, **kwargs)#
Bases:
MysqlSadLockMixin
,BaseAsyncSadLock
- Parameters:
key –
MySQL named lock requires the key given by string.
If
key
is not astr
:convert –
Custom function to covert
key
to required data type.Example
def convert(value) -> str: # get a string key by `value` return the_string_covert_from_value
connection_or_session (TAsyncConnectionOrSession) –
- async release()#