1 <html><body> 2 <style> 3 4 body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13 } 14 15 body { 16 font-size: 13px; 17 padding: 1em; 18 } 19 20 h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23 } 24 25 h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28 } 29 30 h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34 } 35 36 pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39 } 40 41 pre { 42 margin-top: 0.5em; 43 } 44 45 h1, h2, h3, p { 46 font-family: Arial, sans serif; 47 } 48 49 h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51 } 52 53 .toc_element { 54 margin-top: 0.5em; 55 } 56 57 .firstline { 58 margin-left: 2 em; 59 } 60 61 .method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66 } 67 68 .details { 69 font-weight: bold; 70 font-size: 14px; 71 } 72 73 </style> 74 75 <h1><a href="taskqueue_v1beta2.html">TaskQueue API</a> . <a href="taskqueue_v1beta2.tasks.html">tasks</a></h1> 76 <h2>Instance Methods</h2> 77 <p class="toc_element"> 78 <code><a href="#delete">delete(project, taskqueue, task)</a></code></p> 79 <p class="firstline">Delete a task from a TaskQueue.</p> 80 <p class="toc_element"> 81 <code><a href="#get">get(project, taskqueue, task)</a></code></p> 82 <p class="firstline">Get a particular task from a TaskQueue.</p> 83 <p class="toc_element"> 84 <code><a href="#insert">insert(project, taskqueue, body)</a></code></p> 85 <p class="firstline">Insert a new task in a TaskQueue</p> 86 <p class="toc_element"> 87 <code><a href="#lease">lease(project, taskqueue, numTasks, leaseSecs, groupByTag=None, tag=None)</a></code></p> 88 <p class="firstline">Lease 1 or more tasks from a TaskQueue.</p> 89 <p class="toc_element"> 90 <code><a href="#list">list(project, taskqueue)</a></code></p> 91 <p class="firstline">List Tasks in a TaskQueue</p> 92 <p class="toc_element"> 93 <code><a href="#patch">patch(project, taskqueue, task, newLeaseSeconds, body)</a></code></p> 94 <p class="firstline">Update tasks that are leased out of a TaskQueue. This method supports patch semantics.</p> 95 <p class="toc_element"> 96 <code><a href="#update">update(project, taskqueue, task, newLeaseSeconds, body)</a></code></p> 97 <p class="firstline">Update tasks that are leased out of a TaskQueue.</p> 98 <h3>Method Details</h3> 99 <div class="method"> 100 <code class="details" id="delete">delete(project, taskqueue, task)</code> 101 <pre>Delete a task from a TaskQueue. 102 103 Args: 104 project: string, The project under which the queue lies. (required) 105 taskqueue: string, The taskqueue to delete a task from. (required) 106 task: string, The id of the task to delete. (required) 107 </pre> 108 </div> 109 110 <div class="method"> 111 <code class="details" id="get">get(project, taskqueue, task)</code> 112 <pre>Get a particular task from a TaskQueue. 113 114 Args: 115 project: string, The project under which the queue lies. (required) 116 taskqueue: string, The taskqueue in which the task belongs. (required) 117 task: string, The task to get properties of. (required) 118 119 Returns: 120 An object of the form: 121 122 { 123 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 124 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 125 "id": "A String", # Name of the task. 126 "retry_count": 42, # The number of leases applied to this task. 127 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 128 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 129 "queueName": "A String", # Name of the queue that the task is in. 130 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 131 }</pre> 132 </div> 133 134 <div class="method"> 135 <code class="details" id="insert">insert(project, taskqueue, body)</code> 136 <pre>Insert a new task in a TaskQueue 137 138 Args: 139 project: string, The project under which the queue lies (required) 140 taskqueue: string, The taskqueue to insert the task into (required) 141 body: object, The request body. (required) 142 The object takes the form of: 143 144 { 145 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 146 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 147 "id": "A String", # Name of the task. 148 "retry_count": 42, # The number of leases applied to this task. 149 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 150 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 151 "queueName": "A String", # Name of the queue that the task is in. 152 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 153 } 154 155 156 Returns: 157 An object of the form: 158 159 { 160 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 161 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 162 "id": "A String", # Name of the task. 163 "retry_count": 42, # The number of leases applied to this task. 164 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 165 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 166 "queueName": "A String", # Name of the queue that the task is in. 167 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 168 }</pre> 169 </div> 170 171 <div class="method"> 172 <code class="details" id="lease">lease(project, taskqueue, numTasks, leaseSecs, groupByTag=None, tag=None)</code> 173 <pre>Lease 1 or more tasks from a TaskQueue. 174 175 Args: 176 project: string, The project under which the queue lies. (required) 177 taskqueue: string, The taskqueue to lease a task from. (required) 178 numTasks: integer, The number of tasks to lease. (required) 179 leaseSecs: integer, The lease in seconds. (required) 180 groupByTag: boolean, When true, all returned tasks will have the same tag 181 tag: string, The tag allowed for tasks in the response. Must only be specified if group_by_tag is true. If group_by_tag is true and tag is not specified the tag will be that of the oldest task by eta, i.e. the first available tag 182 183 Returns: 184 An object of the form: 185 186 { 187 "items": [ # The actual list of tasks returned as a result of the lease operation. 188 { 189 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 190 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 191 "id": "A String", # Name of the task. 192 "retry_count": 42, # The number of leases applied to this task. 193 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 194 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 195 "queueName": "A String", # Name of the queue that the task is in. 196 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 197 }, 198 ], 199 "kind": "taskqueue#tasks", # The kind of object returned, a list of tasks. 200 }</pre> 201 </div> 202 203 <div class="method"> 204 <code class="details" id="list">list(project, taskqueue)</code> 205 <pre>List Tasks in a TaskQueue 206 207 Args: 208 project: string, The project under which the queue lies. (required) 209 taskqueue: string, The id of the taskqueue to list tasks from. (required) 210 211 Returns: 212 An object of the form: 213 214 { 215 "items": [ # The actual list of tasks currently active in the TaskQueue. 216 { 217 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 218 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 219 "id": "A String", # Name of the task. 220 "retry_count": 42, # The number of leases applied to this task. 221 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 222 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 223 "queueName": "A String", # Name of the queue that the task is in. 224 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 225 }, 226 ], 227 "kind": "taskqueues#tasks", # The kind of object returned, a list of tasks. 228 }</pre> 229 </div> 230 231 <div class="method"> 232 <code class="details" id="patch">patch(project, taskqueue, task, newLeaseSeconds, body)</code> 233 <pre>Update tasks that are leased out of a TaskQueue. This method supports patch semantics. 234 235 Args: 236 project: string, The project under which the queue lies. (required) 237 taskqueue: string, A parameter (required) 238 task: string, A parameter (required) 239 newLeaseSeconds: integer, The new lease in seconds. (required) 240 body: object, The request body. (required) 241 The object takes the form of: 242 243 { 244 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 245 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 246 "id": "A String", # Name of the task. 247 "retry_count": 42, # The number of leases applied to this task. 248 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 249 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 250 "queueName": "A String", # Name of the queue that the task is in. 251 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 252 } 253 254 255 Returns: 256 An object of the form: 257 258 { 259 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 260 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 261 "id": "A String", # Name of the task. 262 "retry_count": 42, # The number of leases applied to this task. 263 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 264 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 265 "queueName": "A String", # Name of the queue that the task is in. 266 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 267 }</pre> 268 </div> 269 270 <div class="method"> 271 <code class="details" id="update">update(project, taskqueue, task, newLeaseSeconds, body)</code> 272 <pre>Update tasks that are leased out of a TaskQueue. 273 274 Args: 275 project: string, The project under which the queue lies. (required) 276 taskqueue: string, A parameter (required) 277 task: string, A parameter (required) 278 newLeaseSeconds: integer, The new lease in seconds. (required) 279 body: object, The request body. (required) 280 The object takes the form of: 281 282 { 283 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 284 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 285 "id": "A String", # Name of the task. 286 "retry_count": 42, # The number of leases applied to this task. 287 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 288 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 289 "queueName": "A String", # Name of the queue that the task is in. 290 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 291 } 292 293 294 Returns: 295 An object of the form: 296 297 { 298 "kind": "taskqueues#task", # The kind of object returned, in this case set to task. 299 "leaseTimestamp": "A String", # Time (in seconds since the epoch) at which the task lease will expire. This value is 0 if the task isnt currently leased out to a worker. 300 "id": "A String", # Name of the task. 301 "retry_count": 42, # The number of leases applied to this task. 302 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag. 303 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded. 304 "queueName": "A String", # Name of the queue that the task is in. 305 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued. 306 }</pre> 307 </div> 308 309 </body></html>