@shared_task(name='nodeconductor.structure.add_user', max_retries=120, default_retry_delay=30)
@retry_if_false
def add_user(user_uuid, service_project_link_str):
    try:
        user = get_user_model().objects.get(uuid=user_uuid)
    except get_user_model().DoesNotExist:
        logger.warning('Missing user %s.', user_uuid)
        return True
    try:
        service_project_link = next(models.ServiceProjectLink.from_string(service_project_link_str))
    except __HOLE__:
        logger.warning('Missing service project link %s.', service_project_link_str)
        return True

    backend = service_project_link.get_backend()
    try:
        backend.add_user(user, service_project_link)
        logger.info(
            'User %s has been added to service project link %s.',
            user.uuid, service_project_link_str)
    except ServiceBackendNotImplemented:
        pass
    except (ServiceBackendError, CloudBackendError):
        logger.warning(
            'Failed to add user %s for service project link %s',
            user.uuid, service_project_link_str,
            exc_info=1)

    return True
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/structure/tasks.py/add_user