Hi,
I have tried the work-around same as the one provided by Eli below, I think
that it works.
I set a serial number (the counter) for every generated tasks.
For every 3 seconds there is an execution.
Now, the serial number goes to 57470 counts. (almost 2 days)


2010/2/25 Eli Jones <eli.jo...@gmail.com>

> You just need to add a try: except: (if you're using Python) to handle
> TombstonedTaskError and TaskAlreadyExistsError.
>
> I use a taskadd function that looks like this:
>
> def taskAdd(name,counter,delay=0,wait=.5):
>     try:
>         taskqueue.add(name = name,url = '/mytasks/doTask',
>                       countdown = delay, params = {'counter' : counter} )
>     except (taskqueue.TaskAlreadyExistsError,
> taskqueue.TombstonedTaskError), e:
>         pass
>     except:
>         from time import sleep
>         sleep(wait)
>         taskAdd(name,counter,delay,2*wait)
>
> Once a task is done.. it adds a new one back to the queue like so:
>
> counter = int(self.request.get('counter')) + 1
> taskAdd(name+str(counter),counter)
>
> That way.. if you get any error besides one indicating the Task is already
> there.. it just tries to add the task again a little later.
>
> Of course.. you give it whatever delay you want.. in case you don't want it
> to start immediately.
>

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

Reply via email to