5

When adding tasks to a queue in AppEngine, task names cannot be reused for a certain amount of time (said to be "tombstoned"). I could not find the duration of the tombstone in the documentation or any way to modify it.

The only thing that hits in the neighborhood is TaskOptions.Builder.etaMillis(), which sets the expected duration of the task (what for, I don't know). There is no documented relationship between this and the tombstone duration.

So, anyone with insight on this?

Nacho Coloma
  • 7,070
  • 2
  • 40
  • 43

3 Answers3

6

It's undefined. This means that developers cannot set it, nor expect an approximate tombstone duration value.

The "certain amount of time" may be arbitrarily set by the GAE team or dynamically set by the system.

If you don't want to run the same tasks during a specific amount of time, you should just really build your own workflow implementation for it. :)

Albert
  • 3,611
  • 3
  • 28
  • 52
  • I'm sorry, but I need a quotation to back this up. I know that the conventional wisdom is that "you cannot control it", but I couldn't confirm this in the documentation or any blog/newsgroup/tweet/whatever from the AppEngine team. I would like to avoid building applications based on assumptions. – Nacho Coloma Dec 06 '12 at 12:44
  • 2
    He's right. Even if a fixed tombstone duration was provided, you should avoid relying on it. The intention is that task names should _never_ be reused; tombstoned entries are only removed to save space. – Nick Johnson Dec 10 '12 at 13:24
4

From official task queue docs:

A task is deleted immediately upon successful execution or deletion, or after a maximum number of failures. The task name can then be re-used after 10 days. Attempting to create another task with that same name during this 10-day period will result in an "item exists" error. To avoid issues with task name re-use, we recommend that you let App Engine generate the task name automatically.

So I think it must be 10 days

notapresent
  • 66
  • 1
  • 4
-2

Why should there be a limitation. I think nobody can imagine Google will reset App Engine. So it is part of your application and you are the only one, who pays the bill. So as long as you pay the bill .... is my answer.

See also this feature request : http://code.google.com/p/googleappengine/issues/detail?id=1774

voscausa
  • 11,253
  • 2
  • 39
  • 67