furious icon indicating copy to clipboard operation
furious copied to clipboard

_insert_tasks() - Doesn't re-raise or attempt re-insert on a single task TransientError

Open markshaule-wf opened this issue 11 years ago • 0 comments

From the following snippet in _insert_tasks() it doesn't appear that a single task would re-raise an error, or attempt a re-insert on a TransientError

    try:
        taskqueue.Queue(name=queue).add(tasks, transactional=transactional)
        return len(tasks)
    except (taskqueue.BadTaskStateError,
            taskqueue.TaskAlreadyExistsError,
            taskqueue.TombstonedTaskError,
            taskqueue.TransientError):
        count = len(tasks)
        if count <= 1:
            return 0

I don't think we want to recursively call _insert_tasks() - we may have the potential to keep recursing until we reach out limit. Maybe just re-raise so the task retries?

markshaule-wf avatar Sep 29 '14 20:09 markshaule-wf