blob: 939311e0f86e04fd959f344688d3a672f54b1c7c [file] [log] [blame]
Joe Gregorio075572b2012-07-09 16:53:09 -04001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, 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
103Args:
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
114Args:
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
119Returns:
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 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
127 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
128 "queueName": "A String", # Name of the queue that the task is in.
129 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
130 }</pre>
131</div>
132
133<div class="method">
134 <code class="details" id="insert">insert(project, taskqueue, body)</code>
135 <pre>Insert a new task in a TaskQueue
136
137Args:
138 project: string, The project under which the queue lies (required)
139 taskqueue: string, The taskqueue to insert the task into (required)
140 body: object, The request body. (required)
141 The object takes the form of:
142
143{
144 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
145 "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.
146 "id": "A String", # Name of the task.
147 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
148 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
149 "queueName": "A String", # Name of the queue that the task is in.
150 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
151 }
152
153
154Returns:
155 An object of the form:
156
157 {
158 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
159 "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.
160 "id": "A String", # Name of the task.
161 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
162 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
163 "queueName": "A String", # Name of the queue that the task is in.
164 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
165 }</pre>
166</div>
167
168<div class="method">
169 <code class="details" id="lease">lease(project, taskqueue, numTasks, leaseSecs, groupByTag=None, tag=None)</code>
170 <pre>Lease 1 or more tasks from a TaskQueue.
171
172Args:
173 project: string, The project under which the queue lies. (required)
174 taskqueue: string, The taskqueue to lease a task from. (required)
175 numTasks: integer, The number of tasks to lease. (required)
176 leaseSecs: integer, The lease in seconds. (required)
177 groupByTag: boolean, When true, all returned tasks will have the same tag
178 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
179
180Returns:
181 An object of the form:
182
183 {
184 "items": [ # The actual list of tasks returned as a result of the lease operation.
185 {
186 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
187 "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.
188 "id": "A String", # Name of the task.
189 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
190 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
191 "queueName": "A String", # Name of the queue that the task is in.
192 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
193 },
194 ],
195 "kind": "taskqueue#tasks", # The kind of object returned, a list of tasks.
196 }</pre>
197</div>
198
199<div class="method">
200 <code class="details" id="list">list(project, taskqueue)</code>
201 <pre>List Tasks in a TaskQueue
202
203Args:
204 project: string, The project under which the queue lies. (required)
205 taskqueue: string, The id of the taskqueue to list tasks from. (required)
206
207Returns:
208 An object of the form:
209
210 {
211 "items": [ # The actual list of tasks currently active in the TaskQueue.
212 {
213 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
214 "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.
215 "id": "A String", # Name of the task.
216 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
217 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
218 "queueName": "A String", # Name of the queue that the task is in.
219 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
220 },
221 ],
222 "kind": "taskqueues#tasks", # The kind of object returned, a list of tasks.
223 }</pre>
224</div>
225
226<div class="method">
227 <code class="details" id="patch">patch(project, taskqueue, task, newLeaseSeconds, body)</code>
228 <pre>Update tasks that are leased out of a TaskQueue. This method supports patch semantics.
229
230Args:
231 project: string, The project under which the queue lies. (required)
232 taskqueue: string, A parameter (required)
233 task: string, A parameter (required)
234 newLeaseSeconds: integer, The new lease in seconds. (required)
235 body: object, The request body. (required)
236 The object takes the form of:
237
238{
239 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
240 "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.
241 "id": "A String", # Name of the task.
242 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
243 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
244 "queueName": "A String", # Name of the queue that the task is in.
245 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
246 }
247
248
249Returns:
250 An object of the form:
251
252 {
253 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
254 "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.
255 "id": "A String", # Name of the task.
256 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
257 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
258 "queueName": "A String", # Name of the queue that the task is in.
259 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
260 }</pre>
261</div>
262
263<div class="method">
264 <code class="details" id="update">update(project, taskqueue, task, newLeaseSeconds, body)</code>
265 <pre>Update tasks that are leased out of a TaskQueue.
266
267Args:
268 project: string, The project under which the queue lies. (required)
269 taskqueue: string, A parameter (required)
270 task: string, A parameter (required)
271 newLeaseSeconds: integer, The new lease in seconds. (required)
272 body: object, The request body. (required)
273 The object takes the form of:
274
275{
276 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
277 "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.
278 "id": "A String", # Name of the task.
279 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
280 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
281 "queueName": "A String", # Name of the queue that the task is in.
282 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
283 }
284
285
286Returns:
287 An object of the form:
288
289 {
290 "kind": "taskqueues#task", # The kind of object returned, in this case set to task.
291 "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.
292 "id": "A String", # Name of the task.
293 "tag": "A String", # Tag for the task, could be used later to lease tasks grouped by a specific tag.
294 "payloadBase64": "A String", # A bag of bytes which is the task payload. The payload on the JSON side is always Base64 encoded.
295 "queueName": "A String", # Name of the queue that the task is in.
296 "enqueueTimestamp": "A String", # Time (in seconds since the epoch) at which the task was enqueued.
297 }</pre>
298</div>
299
300</body></html>