java - 在 Google Appengine 上重试失败的 Cron 任务

标签 java google-app-engine

推送队列任务有一个非常有用的功能:

If the task returns a status code outside of this range, App Engine retries the task until it succeeds.

但是对于 Cron Task 来说似乎不一样。正如我从日志中看到的,如果 Cron 任务失败并显示 500 状态代码,Appengine 不会尝试重试此任务。

我知道我可以将其配置为标准队列( Configuring_Retry_Attempts_for_Failed_Tasks ),并且想知道我可以为 Cron 任务进行这样的配置吗?就像名为 __cron 的队列的配置?

最佳答案

不,您不能,但您可以从 cron 调用任务队列,然后根据需要配置该任务队列。

我问了类似的问题here与下面的响应,我已经对 GAE cron 进行了足够的实验,以确认它确实具有与任务队列相同的可配置性。

[GAE cron] doesn't use a task queue, and the retry options for cron 'tasks' aren't configurable. The closest you can get is to do nothing in your cron 'task' except enqueue another task, which can be configured via a queue.

关于java - 在 Google Appengine 上重试失败的 Cron 任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17992568/

相关文章:

java - JSP 等同于 json_encode(在 PHP 中)是什么?

java - Android将度数符号设置为Textview

google-app-engine - 可以在 Mountain Lion 中使用 GAE over LAN 测试网站吗?

google-app-engine - 将 Google Cloud KMS 与 Flask、gunicorn 和 gevent worker 一起使用时出错 : "google.api_core.exceptions.ServiceUnavailable: 503 Deadline Exceeded"

java - JButton 布局设置

java - 无法实例化 ViewPagerIndicator CirclePageIndicator

python - 本地主机上的 Google App Engine GQL 查询

python - 属性错误: 'MainHandler' object has no attribute '_render_template'

python - 如何在我的 App Engine 应用程序中请求本地 URL?

java - 解析IP范围以获取IP列表