Hi,

Before answering your question, once-only semantics is not fully
guaranteed by gae tasks: "Task names do not provide an absolute
guarantee of once-only semantics. In rare cases, multiple calls to
create a task of the same name may succeed. It's also possible in
exceptional cases for a task to run more than once even if it was only
created once. If you need a guarantee of once-only semantics, use the
datastore.If a task is created successfully, it will eventually be
deleted (at least seven days after the task successfully
executes)" (Source: 
http://code.google.com/appengine/docs/java/taskqueue/overview.html#Worker_URLs_and_Task_Names)


For that reason, you have to write your tasks in an idempotent way:
i.e doing n times is identical to doing 1 time. (for example,
incrementing or adding are NOT idempotent)

So, be careful in the way you write your update task.

Second, about your question, tasks within transactions are guaranteed:
"You can enqueue a task as part of a datastore transaction, such that
the task is only enqueued—and guaranteed to be enqueued—if the
transaction is committed successfully." Source:
http://code.google.com/appengine/docs/java/taskqueue/overview.html#Tasks_Within_Transactions,

The frequency to retry will decrease exponentially if it fails and
fails again,

You can then monitor your queues via the admin console to fix those
extreme cases that would mostly be symptoms of bugs.

regards

didier

On Jan 21, 11:39 am, "ss.require" <ss.requ...@gmail.com> wrote:
> Thanks. Could you specify this question, because it is not completely
> clear.
>
> If I add a task in a queue, is it guaranteed by GAE that the task will
> be retried infinite times unless the task is successfully finished
> once? In other words can there be situations when some serious issues
> with GAE occur and the task remains undone forever?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to