我正在使用googleapis.dev連接我的云任務佇列。我想確保佇列為空并且任務已完成。問題是,“list_tasks”函式是只回傳計劃任務,還是還包括當前正在運行的任務?
uj5u.com熱心網友回復:
API 建議對佇列中的任務執行串列將回傳一個任務陣列,如下所示:
{
"tasks": [
{
object (Task)
}
],
"nextPageToken": string
}
一個示例任務物件是這樣的:
{
"name": string,
"scheduleTime": string,
"createTime": string,
"dispatchDeadline": string,
"dispatchCount": integer,
"responseCount": integer,
"firstAttempt": {
object (Attempt)
},
"lastAttempt": {
object (Attempt)
},
"view": enum (View),
// Union field payload_type can be only one of the following:
"appEngineHttpRequest": {
object (AppEngineHttpRequest)
},
"httpRequest": {
object (HttpRequest)
},
"pullMessage": {
object (PullMessage)
}
// End of list of possible types for union field payload_type.
}
根據檔案:
如果 responseTime 未設定,則任務尚未嘗試或當前正在運行,并且 responseStatus 欄位沒有意義。
TL;DR是,顯示正在運行的任務
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/372074.html
標籤:Python 谷歌应用引擎 谷歌云平台 任务队列 谷歌云任务
