Workiva / furious

Fast and modular async task library for Google App Engine.
Apache License 2.0
37 stars 39 forks source link

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

Open markshaule-wf opened 10 years ago

markshaule-wf commented 10 years ago

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?