2015-09-02 31 views

回答

1

默認行爲是在描述開頭:

由於很多原因,在任務隊列中執行的任務可能會失敗。如果任務 無法執行(通過返回 範圍200-299之外的任何HTTP狀態代碼),App Engine將重試該任務直至成功。默認情況下,系統會逐漸降低重試速率,以避免因太多請求而導致您的應用程序氾濫,但會安排重試嘗試 每小時最多重複一次,直到任務成功。

從本說明書和通過與沒有重試配置觀察在推送隊列中的實際失敗任務的日誌(因此使用默認值對於所有這些參數)I「衍生自」這些值:

  • task_retry_limit :無
  • task_age_limit:無
  • min_backoff_seconds:0.1
  • max_backoff_seconds:3600個
  • max_doublings :無

這是一些我看了看我的開發服務器上的日誌 - 我沒有等到重試間隔安定下來,壽:

INFO  2015-09-02 12:50:54,670 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:50:54,670 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.100 seconds 
INFO  2015-09-02 12:50:54,774 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:50:54,774 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.200 seconds 
INFO  2015-09-02 12:50:54,983 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:50:54,983 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.400 seconds 
INFO  2015-09-02 12:50:55,394 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:50:55,394 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.800 seconds 
INFO  2015-09-02 12:50:56,206 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:50:56,206 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 1.600 seconds 
INFO  2015-09-02 12:50:57,815 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:50:57,815 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 3.200 seconds 
INFO  2015-09-02 12:51:01,058 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:51:01,058 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 6.400 seconds 
INFO  2015-09-02 12:51:07,507 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:51:07,507 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 12.800 seconds 
INFO  2015-09-02 12:51:20,346 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:51:20,346 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 25.600 seconds 
INFO  2015-09-02 12:51:45,988 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:51:45,989 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 51.200 seconds 
INFO  2015-09-02 12:52:37,224 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:52:37,225 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 102.400 seconds 
INFO  2015-09-02 12:54:19,668 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:54:19,668 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 204.800 seconds 
INFO  2015-09-02 12:57:44,508 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55 
WARNING 2015-09-02 12:57:44,509 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 409.600 seconds 

編輯:其實我發現一個更好的答案,我用來糾正我的(我以前錯過了其他人之間埋下的0.100s日誌條目):What are the defaults for a task queue in AppEngine?

相關問題