Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskQueue behavior for duplicate tasks in a list during Queue.add() #55

Closed
soundofjw opened this issue Aug 18, 2015 · 3 comments
Closed

Comments

@soundofjw
Copy link

I have some questions about the behavior of taskqueue.Queue().add(task_list) when 1 of the tasks is duplicate, but the others are not.

I am not aware of any documentation around the taskqueue API that explains this behavior - as such it seems undefined.

My concern is that adding a list of multiple tasks, where 1 may already have been tombstoned/created, may cause the other legitimate tasks to fail.

This affects the pipeline library in the following codeblock:

try:
  taskqueue.Queue(self.queue_name).add(task_list)
except (taskqueue.TombstonedTaskError, taskqueue.TaskAlreadyExistsError):
  pass

if task_list:
try:
taskqueue.Queue(self.queue_name).add(task_list)
except (taskqueue.TombstonedTaskError, taskqueue.TaskAlreadyExistsError):
pass

Any clues? This may be a good question for @tkaitchuck.
This was brought up in issue #54.

@tkaitchuck
Copy link
Contributor

As far as I can tell this is ok. If it turns out not to be, it should be treated as a bug in taskqueue, as a TaskAlreadyExistsError should be raised at a lower priority than a failure for other reasons.

@soundofjw
Copy link
Author

@tkaitchuck It's definitely a task-queue related question, but it's unclear as to what happens to all 10 tasks when 1 out of 10 tasks is a duplicate. Any ideas?

@tkaitchuck
Copy link
Contributor

I know that is the case for Java's task queue that all 10 will be attempted and only if there is no more serious error will that be raised. So I assume it is for the python client as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants