예제 #1
0
def store_friends(user, friends):
    '''
    Inserting again will not cause any errors, so this is safe
    for multiple executions

    :param user: The user for which we are storing
    :type user: User object

    :param friends: List of your friends
    :type friends: list
    '''
    converter_class = get_class_for('user_conversion')
    logger.info('celery is storing %s friends' % len(friends))
    converter_class._store_friends(user, friends)
    return friends
예제 #2
0
파일: tasks.py 프로젝트: pratz/fphoto
def store_friends(user, friends):
    '''
    Inserting again will not cause any errors, so this is safe
    for multiple executions

    :param user: The user for which we are storing
    :type user: User object

    :param friends: List of your friends
    :type friends: list
    '''
    converter_class = get_class_for('user_conversion')
    logger.info('celery is storing %s friends' % len(friends))
    converter_class._store_friends(user, friends)
    return friends