def __init__(self, field, timeout=5, sleep=0.1):
        """
        Save the field and create a real lock,, using the correct connection
        and a computed lock key based on the names of the field and its model.
        """
        self.field = field
        self.sub_lock_mode = False
        super(FieldLock, self).__init__(
            redis=field._model.get_connection(),
            name=make_key(field._model._name, 'lock-for-update', field.name),
            timeout=timeout,
            sleep=sleep,
        )
def __init__ ( self , field , timeout = 5 , sleep = 0.1 ) : self . field = field self . sub_lock_mode = False super ( FieldLock , self ) . __init__ ( redis = field . _model . get_connection ( ) , name = make_key ( field . _model . _name , 'lock-for-update' , field . name ) , timeout = timeout , sleep = sleep , )
Save the field and create a real lock,, using the correct connection
        and a computed lock key based on the names of the field and its model.