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