What is TombstonedTaskError from App Engine's Task Queue?

旧巷老猫 提交于 2019-12-03 14:29:24

问题


What does the TombstonedTaskError mean? It is being raised while trying to add a task to the queue, from a cron-job:

Traceback (most recent call last):
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 501, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/.../tasks.py", line 132, in get
    ).add(queue_name = 'userfeedcheck')
  File "/base/python_lib/versions/1/google/appengine/api/labs/taskqueue/taskqueue.py", line 495, in add
    return Queue(queue_name).add(self)
  File "/base/python_lib/versions/1/google/appengine/api/labs/taskqueue/taskqueue.py", line 563, in add
    self.__TranslateError(e)
  File "/base/python_lib/versions/1/google/appengine/api/labs/taskqueue/taskqueue.py", line 619, in __TranslateError
    raise TombstonedTaskError(error.error_detail)
TombstonedTaskError

Searching the documentation only has the following to say:

exception TombstonedTaskError(InvalidTaskError)
    Task has been tombstoned.

..which isn't particularly helpful.

I couldn't find anything useful in the App Engine code either..


回答1:


You've added a task with that exact name before. Although it's already run, executed task names are kept around for some time to prevent accidental duplicates. If you're assigning task names, you should be using ones that are globally unique to prevent this occurring.



来源:https://stackoverflow.com/questions/1101162/what-is-tombstonedtaskerror-from-app-engines-task-queue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!