【发布时间】:2015-09-23 13:30:46
【问题描述】:
在将任务添加到拉取队列之前,我必须确认队列中是否已经存在相同的任务,如果存在应该跳过任务添加到队列。添加带有名称的任务对我不起作用,因为它直到队列中的 7 天才过期,甚至被删除。
我们可以使用REST API 列出任务。同理,我们能否在GAE模块中获取任务列表,或者有没有其他方法可以在Google App Engine模块中查找任务是否存在于队列中?
谢谢
【问题讨论】:
-
我不完全理解(您没有解释)您不能只使用名称和 REST API 的原因...?
-
嗨尼克,根据我的要求,类似通知之类的任务会出现一段时间(例如 5 分钟)。因此,为避免重复通知,需要在该持续时间内(即 5 分钟内)发送先到先服务方式。因此,需要在该持续时间内运行独特的任务。
-
你能详细解释一下
"Adding task with name doesn't work for me as it doesn't expire until seven days from the queue even deleted"的意思吗? -
另外,
"can we get the list of tasks within GAE module or is there any other way to find whether task exists in the queue within Google App Engine module?"是什么意思?
标签: java google-app-engine pull-queue