google-cloud-tasks 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/google/cloud/tasks.rb +2 -2
- data/lib/google/cloud/tasks/v2.rb +2 -2
- data/lib/google/cloud/tasks/v2/cloud_tasks_client.rb +15 -45
- data/lib/google/cloud/tasks/v2/cloudtasks_pb.rb +2 -1
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/cloudtasks.rb +15 -45
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/queue.rb +2 -3
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/target.rb +16 -10
- data/lib/google/cloud/tasks/v2/doc/google/cloud/tasks/v2/task.rb +1 -3
- data/lib/google/cloud/tasks/v2/doc/google/iam/v1/policy.rb +2 -2
- data/lib/google/cloud/tasks/v2/queue_pb.rb +1 -1
- data/lib/google/cloud/tasks/v2/task_pb.rb +1 -1
- data/lib/google/cloud/tasks/v2beta2.rb +2 -2
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +211 -267
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_pb.rb +3 -1
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +58 -69
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +188 -250
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +57 -81
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +86 -89
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +25 -42
- data/lib/google/cloud/tasks/v2beta2/doc/google/iam/v1/policy.rb +2 -2
- data/lib/google/cloud/tasks/v2beta2/queue_pb.rb +2 -1
- data/lib/google/cloud/tasks/v2beta2/target_pb.rb +0 -1
- data/lib/google/cloud/tasks/v2beta2/task_pb.rb +2 -1
- data/lib/google/cloud/tasks/v2beta3.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client.rb +15 -45
- data/lib/google/cloud/tasks/v2beta3/cloudtasks_pb.rb +2 -1
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/cloudtasks.rb +15 -45
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/target.rb +5 -5
- data/lib/google/cloud/tasks/v2beta3/doc/google/iam/v1/policy.rb +2 -2
- data/lib/google/cloud/tasks/v2beta3/queue_pb.rb +1 -1
- data/lib/google/cloud/tasks/v2beta3/task_pb.rb +1 -1
- data/lib/google/cloud/tasks/version.rb +1 -1
- metadata +3 -3
@@ -22,9 +22,8 @@ module Google
|
|
22
22
|
# retry options, target types, and others.
|
23
23
|
# @!attribute [rw] name
|
24
24
|
# @return [String]
|
25
|
-
# Caller-specified and required in
|
26
|
-
#
|
27
|
-
# which it becomes output only.
|
25
|
+
# Caller-specified and required in {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateQueue CreateQueue},
|
26
|
+
# after which it becomes output only.
|
28
27
|
#
|
29
28
|
# The queue name.
|
30
29
|
#
|
@@ -46,33 +45,29 @@ module Google
|
|
46
45
|
# @return [Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget]
|
47
46
|
# App Engine HTTP target.
|
48
47
|
#
|
49
|
-
# An App Engine queue is a queue that has an
|
50
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}.
|
48
|
+
# An App Engine queue is a queue that has an {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}.
|
51
49
|
# @!attribute [rw] pull_target
|
52
50
|
# @return [Google::Cloud::Tasks::V2beta2::PullTarget]
|
53
51
|
# Pull target.
|
54
52
|
#
|
55
|
-
# A pull queue is a queue that has a
|
56
|
-
# {Google::Cloud::Tasks::V2beta2::PullTarget PullTarget}.
|
53
|
+
# A pull queue is a queue that has a {Google::Cloud::Tasks::V2beta2::PullTarget PullTarget}.
|
57
54
|
# @!attribute [rw] rate_limits
|
58
55
|
# @return [Google::Cloud::Tasks::V2beta2::RateLimits]
|
59
56
|
# Rate limits for task dispatches.
|
60
57
|
#
|
61
58
|
# {Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} and
|
62
|
-
# {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} are related
|
63
|
-
#
|
59
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} are related because they both
|
60
|
+
# control task attempts however they control how tasks are
|
64
61
|
# attempted in different ways:
|
65
62
|
#
|
66
|
-
# * {Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} controls the
|
67
|
-
# total rate of
|
63
|
+
# * {Google::Cloud::Tasks::V2beta2::Queue#rate_limits rate_limits} controls the total rate of
|
68
64
|
# dispatches from a queue (i.e. all traffic dispatched from the
|
69
65
|
# queue, regardless of whether the dispatch is from a first
|
70
66
|
# attempt or a retry).
|
71
|
-
# * {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls
|
72
|
-
# what happens to
|
67
|
+
# * {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls what happens to
|
73
68
|
# particular a task after its first attempt fails. That is,
|
74
|
-
# {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls
|
75
|
-
#
|
69
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry_config} controls task retries (the
|
70
|
+
# second attempt, third attempt, etc).
|
76
71
|
# @!attribute [rw] retry_config
|
77
72
|
# @return [Google::Cloud::Tasks::V2beta2::RetryConfig]
|
78
73
|
# Settings that determine the retry behavior.
|
@@ -91,21 +86,18 @@ module Google
|
|
91
86
|
#
|
92
87
|
# `state` can only be changed by called
|
93
88
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::PauseQueue PauseQueue},
|
94
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::ResumeQueue ResumeQueue}, or
|
95
|
-
# uploading
|
89
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::ResumeQueue ResumeQueue}, or uploading
|
96
90
|
# [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
|
97
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::UpdateQueue UpdateQueue} cannot be
|
98
|
-
# used to change `state`.
|
91
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::UpdateQueue UpdateQueue} cannot be used to change `state`.
|
99
92
|
# @!attribute [rw] purge_time
|
100
93
|
# @return [Google::Protobuf::Timestamp]
|
101
94
|
# Output only. The last time this queue was purged.
|
102
95
|
#
|
103
|
-
# All tasks that were {Google::Cloud::Tasks::V2beta2::Task#create_time created}
|
104
|
-
#
|
96
|
+
# All tasks that were {Google::Cloud::Tasks::V2beta2::Task#create_time created} before this time
|
97
|
+
# were purged.
|
105
98
|
#
|
106
|
-
# A queue can be purged using
|
107
|
-
#
|
108
|
-
# Engine Task Queue SDK, or the Cloud
|
99
|
+
# A queue can be purged using {Google::Cloud::Tasks::V2beta2::CloudTasks::PurgeQueue PurgeQueue}, the
|
100
|
+
# [App Engine Task Queue SDK, or the Cloud
|
109
101
|
# Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
|
110
102
|
#
|
111
103
|
# Purge time will be truncated to the nearest microsecond. Purge
|
@@ -129,8 +121,8 @@ module Google
|
|
129
121
|
# Tasks are paused by the user. If the queue is paused then Cloud
|
130
122
|
# Tasks will stop delivering tasks from it, but more tasks can
|
131
123
|
# still be added to it by the user. When a pull queue is paused,
|
132
|
-
# all {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} calls
|
133
|
-
#
|
124
|
+
# all {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} calls will return a
|
125
|
+
# {Google::Rpc::Code::FAILED_PRECONDITION FAILED_PRECONDITION}.
|
134
126
|
PAUSED = 2
|
135
127
|
|
136
128
|
# The queue is disabled.
|
@@ -144,8 +136,8 @@ module Google
|
|
144
136
|
#
|
145
137
|
# When a queue is disabled, tasks can still be added to a queue
|
146
138
|
# but the tasks are not dispatched and
|
147
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} calls
|
148
|
-
#
|
139
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} calls return a
|
140
|
+
# `FAILED_PRECONDITION` error.
|
149
141
|
#
|
150
142
|
# To permanently delete this queue and all of its tasks, call
|
151
143
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::DeleteQueue DeleteQueue}.
|
@@ -158,10 +150,8 @@ module Google
|
|
158
150
|
# This message determines the maximum rate that tasks can be dispatched by a
|
159
151
|
# queue, regardless of whether the dispatch is a first task attempt or a retry.
|
160
152
|
#
|
161
|
-
# Note: The debugging command,
|
162
|
-
# {Google::Cloud::Tasks::V2beta2::
|
163
|
-
# even if the queue has reached its
|
164
|
-
# {Google::Cloud::Tasks::V2beta2::RateLimits RateLimits}.
|
153
|
+
# Note: The debugging command, {Google::Cloud::Tasks::V2beta2::CloudTasks::RunTask RunTask}, will run a task
|
154
|
+
# even if the queue has reached its {Google::Cloud::Tasks::V2beta2::RateLimits RateLimits}.
|
165
155
|
# @!attribute [rw] max_tasks_dispatched_per_second
|
166
156
|
# @return [Float]
|
167
157
|
# The maximum rate at which tasks are dispatched from this queue.
|
@@ -169,14 +159,11 @@ module Google
|
|
169
159
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
170
160
|
# default.
|
171
161
|
#
|
172
|
-
# * For {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues},
|
173
|
-
# the maximum allowed value
|
162
|
+
# * For {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget App Engine queues}, the maximum allowed value
|
174
163
|
# is 500.
|
175
|
-
# * This field is output only for
|
176
|
-
# queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the
|
164
|
+
# * This field is output only for {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}. In addition to the
|
177
165
|
# `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
|
178
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} requests
|
179
|
-
# are allowed per pull queue.
|
166
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} requests are allowed per pull queue.
|
180
167
|
#
|
181
168
|
#
|
182
169
|
# This field has the same meaning as
|
@@ -209,9 +196,9 @@ module Google
|
|
209
196
|
# `queue.yaml/xml`, `max_burst_size` is equal to
|
210
197
|
# [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
|
211
198
|
# Since `max_burst_size` is output only, if
|
212
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::UpdateQueue UpdateQueue} is called
|
213
|
-
#
|
214
|
-
#
|
199
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::UpdateQueue UpdateQueue} is called on a queue
|
200
|
+
# created by `queue.yaml/xml`, `max_burst_size` will be reset based
|
201
|
+
# on the value of
|
215
202
|
# {Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second},
|
216
203
|
# regardless of whether
|
217
204
|
# {Google::Cloud::Tasks::V2beta2::RateLimits#max_tasks_dispatched_per_second max_tasks_dispatched_per_second}
|
@@ -230,9 +217,8 @@ module Google
|
|
230
217
|
# The maximum allowed value is 5,000.
|
231
218
|
#
|
232
219
|
# This field is output only for
|
233
|
-
# {Google::Cloud::Tasks::V2beta2::PullTarget pull queues} and always -1, which
|
234
|
-
#
|
235
|
-
# set to -1.
|
220
|
+
# {Google::Cloud::Tasks::V2beta2::PullTarget pull queues} and always -1, which indicates no limit. No other
|
221
|
+
# queue types can have `max_concurrent_tasks` set to -1.
|
236
222
|
#
|
237
223
|
#
|
238
224
|
# This field has the same meaning as
|
@@ -258,17 +244,16 @@ module Google
|
|
258
244
|
# If positive, `max_retry_duration` specifies the time limit for
|
259
245
|
# retrying a failed task, measured from when the task was first
|
260
246
|
# attempted. Once `max_retry_duration` time has passed *and* the
|
261
|
-
# task has been attempted
|
262
|
-
#
|
263
|
-
#
|
247
|
+
# task has been attempted {Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts}
|
248
|
+
# times, no further attempts will be made and the task will be
|
249
|
+
# deleted.
|
264
250
|
#
|
265
251
|
# If zero, then the task age is unlimited.
|
266
252
|
#
|
267
253
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
268
254
|
# default.
|
269
255
|
#
|
270
|
-
# This field is output only for
|
271
|
-
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
256
|
+
# This field is output only for {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}.
|
272
257
|
#
|
273
258
|
#
|
274
259
|
# `max_retry_duration` will be truncated to the nearest second.
|
@@ -278,19 +263,16 @@ module Google
|
|
278
263
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
279
264
|
# @!attribute [rw] min_backoff
|
280
265
|
# @return [Google::Protobuf::Duration]
|
281
|
-
# A task will be {Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled}
|
282
|
-
# for retry between
|
266
|
+
# A task will be {Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled} for retry between
|
283
267
|
# {Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and
|
284
|
-
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration
|
285
|
-
#
|
286
|
-
#
|
287
|
-
# task should be retried.
|
268
|
+
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration after it fails,
|
269
|
+
# if the queue's {Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the task should be
|
270
|
+
# retried.
|
288
271
|
#
|
289
272
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
290
273
|
# default.
|
291
274
|
#
|
292
|
-
# This field is output only for
|
293
|
-
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
275
|
+
# This field is output only for {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}.
|
294
276
|
#
|
295
277
|
#
|
296
278
|
# `min_backoff` will be truncated to the nearest second.
|
@@ -300,19 +282,16 @@ module Google
|
|
300
282
|
# queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
|
301
283
|
# @!attribute [rw] max_backoff
|
302
284
|
# @return [Google::Protobuf::Duration]
|
303
|
-
# A task will be {Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled}
|
304
|
-
# for retry between
|
285
|
+
# A task will be {Google::Cloud::Tasks::V2beta2::Task#schedule_time scheduled} for retry between
|
305
286
|
# {Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} and
|
306
|
-
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration
|
307
|
-
#
|
308
|
-
#
|
309
|
-
# task should be retried.
|
287
|
+
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} duration after it fails,
|
288
|
+
# if the queue's {Google::Cloud::Tasks::V2beta2::RetryConfig RetryConfig} specifies that the task should be
|
289
|
+
# retried.
|
310
290
|
#
|
311
291
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
312
292
|
# default.
|
313
293
|
#
|
314
|
-
# This field is output only for
|
315
|
-
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
294
|
+
# This field is output only for {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}.
|
316
295
|
#
|
317
296
|
#
|
318
297
|
# `max_backoff` will be truncated to the nearest second.
|
@@ -325,29 +304,26 @@ module Google
|
|
325
304
|
# The time between retries will double `max_doublings` times.
|
326
305
|
#
|
327
306
|
# A task's retry interval starts at
|
328
|
-
# {Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then
|
329
|
-
#
|
330
|
-
# retries at intervals of
|
307
|
+
# {Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff}, then doubles
|
308
|
+
# `max_doublings` times, then increases linearly, and finally
|
309
|
+
# retries retries at intervals of
|
331
310
|
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} up to
|
332
311
|
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts} times.
|
333
312
|
#
|
334
|
-
# For example, if
|
335
|
-
# {Google::Cloud::Tasks::V2beta2::RetryConfig#
|
336
|
-
#
|
337
|
-
#
|
338
|
-
#
|
339
|
-
#
|
340
|
-
# {Google::Cloud::Tasks::V2beta2::RetryConfig#
|
341
|
-
#
|
342
|
-
#
|
343
|
-
# Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, 240s, 300s,
|
344
|
-
# 300s, ....
|
313
|
+
# For example, if {Google::Cloud::Tasks::V2beta2::RetryConfig#min_backoff min_backoff} is 10s,
|
314
|
+
# {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} is 300s, and
|
315
|
+
# `max_doublings` is 3, then the a task will first be retried in
|
316
|
+
# 10s. The retry interval will double three times, and then
|
317
|
+
# increase linearly by 2^3 * 10s. Finally, the task will retry at
|
318
|
+
# intervals of {Google::Cloud::Tasks::V2beta2::RetryConfig#max_backoff max_backoff} until the
|
319
|
+
# task has been attempted {Google::Cloud::Tasks::V2beta2::RetryConfig#max_attempts max_attempts}
|
320
|
+
# times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
|
321
|
+
# 240s, 300s, 300s, ....
|
345
322
|
#
|
346
323
|
# If unspecified when the queue is created, Cloud Tasks will pick the
|
347
324
|
# default.
|
348
325
|
#
|
349
|
-
# This field is output only for
|
350
|
-
# queues][google.cloud.tasks.v2beta2.PullTarget].
|
326
|
+
# This field is output only for {Google::Cloud::Tasks::V2beta2::PullTarget pull queues}.
|
351
327
|
#
|
352
328
|
#
|
353
329
|
# This field has the same meaning as
|
@@ -21,8 +21,7 @@ module Google
|
|
21
21
|
class PullTarget; end
|
22
22
|
|
23
23
|
# The pull message contains data that can be used by the caller of
|
24
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} to process the
|
25
|
-
# task.
|
24
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks LeaseTasks} to process the task.
|
26
25
|
#
|
27
26
|
# This proto can only be used for tasks in a queue which has
|
28
27
|
# {Google::Cloud::Tasks::V2beta2::Queue#pull_target pull_target} set.
|
@@ -35,11 +34,10 @@ module Google
|
|
35
34
|
#
|
36
35
|
# Tags allow similar tasks to be processed in a batch. If you label
|
37
36
|
# tasks with a tag, your worker can
|
38
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks lease tasks} with the
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# day, you could tag tasks with the user ID.
|
37
|
+
# {Google::Cloud::Tasks::V2beta2::CloudTasks::LeaseTasks lease tasks} with the same tag using
|
38
|
+
# {Google::Cloud::Tasks::V2beta2::LeaseTasksRequest#filter filter}. For example, if you want to
|
39
|
+
# aggregate the events associated with a specific user once a day,
|
40
|
+
# you could tag tasks with the user ID.
|
43
41
|
#
|
44
42
|
# The task's tag can only be set when the
|
45
43
|
# {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask task is created}.
|
@@ -56,15 +54,11 @@ module Google
|
|
56
54
|
# App Engine HTTP target.
|
57
55
|
#
|
58
56
|
# The task will be delivered to the App Engine application hostname
|
59
|
-
# specified by its
|
60
|
-
# {Google::Cloud::Tasks::V2beta2::
|
61
|
-
#
|
62
|
-
#
|
63
|
-
# {Google::Cloud::Tasks::V2beta2::
|
64
|
-
# explains how the task's host URL is constructed.
|
65
|
-
#
|
66
|
-
# Using {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget}
|
67
|
-
# requires
|
57
|
+
# specified by its {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} and {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}.
|
58
|
+
# The documentation for {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} explains how the
|
59
|
+
# task's host URL is constructed.
|
60
|
+
#
|
61
|
+
# Using {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget AppEngineHttpTarget} requires
|
68
62
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
69
63
|
# Google IAM permission for the project
|
70
64
|
# and the following scope:
|
@@ -73,13 +67,11 @@ module Google
|
|
73
67
|
# @!attribute [rw] app_engine_routing_override
|
74
68
|
# @return [Google::Cloud::Tasks::V2beta2::AppEngineRouting]
|
75
69
|
# Overrides for the
|
76
|
-
#
|
77
|
-
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
70
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
|
78
71
|
#
|
79
72
|
# If set, `app_engine_routing_override` is used for all tasks in
|
80
73
|
# the queue, no matter what the setting is for the
|
81
|
-
#
|
82
|
-
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
74
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
|
83
75
|
class AppEngineHttpTarget; end
|
84
76
|
|
85
77
|
# App Engine HTTP request.
|
@@ -88,11 +80,9 @@ module Google
|
|
88
80
|
# the task is dispatched.
|
89
81
|
#
|
90
82
|
# This proto can only be used for tasks in a queue which has
|
91
|
-
# {Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target}
|
92
|
-
# set.
|
83
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#app_engine_http_target app_engine_http_target} set.
|
93
84
|
#
|
94
|
-
# Using {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest}
|
95
|
-
# requires
|
85
|
+
# Using {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest AppEngineHttpRequest} requires
|
96
86
|
# [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
|
97
87
|
# Google IAM permission for the project
|
98
88
|
# and the following scope:
|
@@ -106,17 +96,20 @@ module Google
|
|
106
96
|
# and how routing is affected by
|
107
97
|
# [dispatch
|
108
98
|
# files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
|
99
|
+
# Traffic is encrypted during transport and never leaves Google datacenters.
|
100
|
+
# Because this traffic is carried over a communication mechanism internal to
|
101
|
+
# Google, you cannot explicitly set the protocol (for example, HTTP or HTTPS).
|
102
|
+
# The request to the handler, however, will appear to have used the HTTP
|
103
|
+
# protocol.
|
109
104
|
#
|
110
|
-
# The {Google::Cloud::Tasks::V2beta2::AppEngineRouting AppEngineRouting} used to
|
111
|
-
#
|
112
|
-
# or task-level:
|
105
|
+
# The {Google::Cloud::Tasks::V2beta2::AppEngineRouting AppEngineRouting} used to construct the URL that the task is
|
106
|
+
# delivered to can be set at the queue-level or task-level:
|
113
107
|
#
|
114
108
|
# * If set,
|
115
109
|
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override}
|
116
110
|
# is used for all tasks in the queue, no matter what the setting
|
117
111
|
# is for the
|
118
|
-
#
|
119
|
-
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
112
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
|
120
113
|
#
|
121
114
|
#
|
122
115
|
# The `url` that the task will be sent to is:
|
@@ -124,13 +117,27 @@ module Google
|
|
124
117
|
# * `url =` {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} `+`
|
125
118
|
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#relative_url relative_url}
|
126
119
|
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
120
|
+
# Tasks can be dispatched to secure app handlers, unsecure app handlers, and
|
121
|
+
# URIs restricted with
|
122
|
+
# [`login:
|
123
|
+
# admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref).
|
124
|
+
# Because tasks are not run as any user, they cannot be dispatched to URIs
|
125
|
+
# restricted with
|
126
|
+
# [`login:
|
127
|
+
# required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
|
128
|
+
# Task dispatches also do not follow redirects.
|
129
|
+
#
|
130
|
+
# The task attempt has succeeded if the app's request handler returns an HTTP
|
131
|
+
# response code in the range [`200` - `299`]. The task attempt has failed if
|
132
|
+
# the app's handler returns a non-2xx response code or Cloud Tasks does
|
133
|
+
# not receive response before the {Task#dispatch_deadline deadline}. Failed
|
134
|
+
# tasks will be retried according to the
|
135
|
+
# {Google::Cloud::Tasks::V2beta2::Queue#retry_config retry configuration}. `503` (Service Unavailable) is
|
136
|
+
# considered an App Engine system error instead of an application error and
|
137
|
+
# will cause Cloud Tasks' traffic congestion control to temporarily throttle
|
138
|
+
# the queue's dispatches. Unlike other types of task targets, a `429` (Too Many
|
139
|
+
# Requests) response from an app handler does not cause traffic congestion
|
140
|
+
# control to throttle the queue.
|
134
141
|
# @!attribute [rw] http_method
|
135
142
|
# @return [Google::Cloud::Tasks::V2beta2::HttpMethod]
|
136
143
|
# The HTTP method to use for the request. The default is POST.
|
@@ -151,8 +158,7 @@ module Google
|
|
151
158
|
# If set,
|
152
159
|
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpTarget#app_engine_routing_override app_engine_routing_override}
|
153
160
|
# is used for all tasks in the queue, no matter what the setting is for the
|
154
|
-
#
|
155
|
-
# app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
|
161
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
|
156
162
|
# @!attribute [rw] relative_url
|
157
163
|
# @return [String]
|
158
164
|
# The relative URL.
|
@@ -178,8 +184,7 @@ module Google
|
|
178
184
|
# `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
|
179
185
|
# modified `User-Agent`.
|
180
186
|
#
|
181
|
-
# If the task has a
|
182
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#payload payload}, Cloud
|
187
|
+
# If the task has a {Google::Cloud::Tasks::V2beta2::AppEngineHttpRequest#payload payload}, Cloud
|
183
188
|
# Tasks sets the following headers:
|
184
189
|
#
|
185
190
|
# * `Content-Type`: By default, the `Content-Type` header is set to
|
@@ -204,10 +209,8 @@ module Google
|
|
204
209
|
# visible when the task is returned in a Cloud Tasks response.
|
205
210
|
#
|
206
211
|
# Although there is no specific limit for the maximum number of headers or
|
207
|
-
# the size, there is a limit on the maximum size of the
|
208
|
-
# {Google::Cloud::Tasks::V2beta2::
|
209
|
-
# {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask CreateTask}
|
210
|
-
# documentation.
|
212
|
+
# the size, there is a limit on the maximum size of the {Google::Cloud::Tasks::V2beta2::Task Task}. For more
|
213
|
+
# information, see the {Google::Cloud::Tasks::V2beta2::CloudTasks::CreateTask CreateTask} documentation.
|
211
214
|
# @!attribute [rw] payload
|
212
215
|
# @return [String]
|
213
216
|
# Payload.
|
@@ -220,6 +223,9 @@ module Google
|
|
220
223
|
|
221
224
|
# App Engine Routing.
|
222
225
|
#
|
226
|
+
# Defines routing characteristics specific to App Engine - service, version,
|
227
|
+
# and instance.
|
228
|
+
#
|
223
229
|
# For more information about services, versions, and instances see
|
224
230
|
# [An Overview of App
|
225
231
|
# Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
|
@@ -237,18 +243,16 @@ module Google
|
|
237
243
|
# service when the task is attempted.
|
238
244
|
#
|
239
245
|
# For some queues or tasks which were created using the App Engine
|
240
|
-
# Task Queue API, {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is
|
241
|
-
#
|
242
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
246
|
+
# Task Queue API, {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable
|
247
|
+
# into {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
243
248
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
244
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For
|
245
|
-
#
|
246
|
-
#
|
247
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable,
|
248
|
-
#
|
249
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For example, some tasks
|
250
|
+
# which were created using the App Engine SDK use a custom domain
|
251
|
+
# name; custom domains are not parsed by Cloud Tasks. If
|
252
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, then
|
253
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
249
254
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
250
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the
|
251
|
-
# empty string.
|
255
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the empty string.
|
252
256
|
# @!attribute [rw] version
|
253
257
|
# @return [String]
|
254
258
|
# App version.
|
@@ -257,18 +261,16 @@ module Google
|
|
257
261
|
# version when the task is attempted.
|
258
262
|
#
|
259
263
|
# For some queues or tasks which were created using the App Engine
|
260
|
-
# Task Queue API, {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is
|
261
|
-
#
|
262
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
264
|
+
# Task Queue API, {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable
|
265
|
+
# into {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
263
266
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
264
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For
|
265
|
-
#
|
266
|
-
#
|
267
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable,
|
268
|
-
#
|
267
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}. For example, some tasks
|
268
|
+
# which were created using the App Engine SDK use a custom domain
|
269
|
+
# name; custom domains are not parsed by Cloud Tasks. If
|
270
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#host host} is not parsable, then
|
271
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
269
272
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, and
|
270
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the
|
271
|
-
# empty string.
|
273
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} are the empty string.
|
272
274
|
# @!attribute [rw] instance
|
273
275
|
# @return [String]
|
274
276
|
# App instance.
|
@@ -309,49 +311,44 @@ module Google
|
|
309
311
|
# queue's project ID. Some tasks which were created using the App Engine
|
310
312
|
# SDK use a custom domain name.
|
311
313
|
#
|
312
|
-
# * `service =`
|
313
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
314
|
+
# * `service =` {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
314
315
|
#
|
315
|
-
# * `version =`
|
316
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}
|
316
|
+
# * `version =` {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}
|
317
317
|
#
|
318
318
|
# * `version_dot_service =`
|
319
319
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} `+ '.' +`
|
320
320
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
321
321
|
#
|
322
|
-
# * `instance =`
|
323
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}
|
322
|
+
# * `instance =` {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance}
|
324
323
|
#
|
325
324
|
# * `instance_dot_service =`
|
326
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
327
|
-
#
|
325
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' +`
|
326
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
328
327
|
#
|
329
328
|
# * `instance_dot_version =`
|
330
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
331
|
-
#
|
329
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' +`
|
330
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}
|
332
331
|
#
|
333
332
|
# * `instance_dot_version_dot_service =`
|
334
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.'
|
335
|
-
#
|
336
|
-
#
|
333
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} `+ '.' +`
|
334
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} `+ '.' +`
|
335
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service}
|
337
336
|
#
|
338
|
-
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} is empty,
|
339
|
-
#
|
340
|
-
# the task is attempted.
|
337
|
+
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service} is empty, then the task will be sent
|
338
|
+
# to the service which is the default service when the task is attempted.
|
341
339
|
#
|
342
|
-
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} is empty,
|
343
|
-
#
|
344
|
-
# the task is attempted.
|
340
|
+
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version} is empty, then the task will be sent
|
341
|
+
# to the version which is the default version when the task is attempted.
|
345
342
|
#
|
346
|
-
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is
|
347
|
-
#
|
348
|
-
#
|
343
|
+
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is empty, then the task
|
344
|
+
# will be sent to an instance which is available when the task is
|
345
|
+
# attempted.
|
349
346
|
#
|
350
347
|
# If {Google::Cloud::Tasks::V2beta2::AppEngineRouting#service service},
|
351
348
|
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#version version}, or
|
352
|
-
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is
|
353
|
-
#
|
354
|
-
#
|
349
|
+
# {Google::Cloud::Tasks::V2beta2::AppEngineRouting#instance instance} is invalid, then the task
|
350
|
+
# will be sent to the default version of the default service when
|
351
|
+
# the task is attempted.
|
355
352
|
class AppEngineRouting; end
|
356
353
|
|
357
354
|
# The HTTP method used to execute the task.
|