def insert_tasks_ignore_duplicate_names(tasks, queue, *args, **kwargs):

    from google.appengine.api import taskqueue

    try:
        inserted = _insert_tasks(tasks, queue, *args, **kwargs)

        return inserted
    except taskqueue.DuplicateTaskNameError:
        # At least one task failed in our batch, attempt to re-insert the
        # remaining tasks.  Named tasks can never be transactional.
        reinsert = _tasks_to_reinsert(tasks, transactional=False)

        count = len(reinsert)
        inserted = len(tasks) - count

        # Our subsequent task inserts should raise TaskAlreadyExistsError at
        # least once, but that will be swallowed by _insert_tasks.
        for task in reinsert:
            inserted += _insert_tasks([task], queue, *args, **kwargs)

        return inserted
modify_ext(dn, modlist[,serverctrls=None[,clientctrls=None]]) -> int
dataset/ETHPy150Open Workiva/furious/furious/extras/insert_task_handlers.py/insert_tasks_ignore_duplicate_names--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/python-ldap-2.3.13/Lib/ldap/ldapobject.py/SimpleLDAPObject.modify_ext