google-cloud-tasks 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/tasks/v2beta2/cloud_tasks_client.rb +210 -181
- data/lib/google/cloud/tasks/v2beta2/cloudtasks_services_pb.rb +79 -63
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/cloudtasks.rb +178 -146
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/queue.rb +103 -68
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/target.rb +110 -71
- data/lib/google/cloud/tasks/v2beta2/doc/google/cloud/tasks/v2beta2/task.rb +43 -25
- data/lib/google/cloud/tasks/v2beta2/doc/google/rpc/status.rb +17 -14
- data/lib/google/cloud/tasks/v2beta3/cloud_tasks_client.rb +123 -104
- data/lib/google/cloud/tasks/v2beta3/cloudtasks_services_pb.rb +51 -39
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/cloudtasks.rb +116 -92
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/queue.rb +84 -55
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/target.rb +175 -52
- data/lib/google/cloud/tasks/v2beta3/doc/google/cloud/tasks/v2beta3/task.rb +40 -16
- data/lib/google/cloud/tasks/v2beta3/doc/google/rpc/status.rb +17 -14
- data/lib/google/cloud/tasks/v2beta3/target_pb.rb +7 -0
- data/lib/google/cloud/tasks/v2beta3/task_pb.rb +1 -0
- metadata +4 -4
@@ -20,7 +20,8 @@ module Google
|
|
20
20
|
# A unit of scheduled work.
|
21
21
|
# @!attribute [rw] name
|
22
22
|
# @return [String]
|
23
|
-
# Optionally caller-specified in
|
23
|
+
# Optionally caller-specified in
|
24
|
+
# {Google::Cloud::Tasks::V2beta3::CloudTasks::CreateTask CreateTask}.
|
24
25
|
#
|
25
26
|
# The task name.
|
26
27
|
#
|
@@ -30,7 +31,8 @@ module Google
|
|
30
31
|
# * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
|
31
32
|
# hyphens (-), colons (:), or periods (.).
|
32
33
|
# For more information, see
|
33
|
-
# [Identifying
|
34
|
+
# [Identifying
|
35
|
+
# projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
|
34
36
|
# * `LOCATION_ID` is the canonical ID for the task's location.
|
35
37
|
# The list of available locations can be obtained by calling
|
36
38
|
# {Google::Cloud::Location::Locations::ListLocations ListLocations}.
|
@@ -43,7 +45,19 @@ module Google
|
|
43
45
|
# @return [Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest]
|
44
46
|
# HTTP request that is sent to the App Engine app handler.
|
45
47
|
#
|
46
|
-
# An App Engine task is a task that has
|
48
|
+
# An App Engine task is a task that has
|
49
|
+
# {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest AppEngineHttpRequest}
|
50
|
+
# set.
|
51
|
+
# @!attribute [rw] http_request
|
52
|
+
# @return [Google::Cloud::Tasks::V2beta3::HttpRequest]
|
53
|
+
# HTTP request that is sent to the task's target.
|
54
|
+
#
|
55
|
+
# Warning: This is an [alpha](https://cloud.google.com/terms/launch-stages)
|
56
|
+
# feature. If you haven't already joined, you can [use this form to sign
|
57
|
+
# up](https://docs.google.com/forms/d/e/1FAIpQLSfc4uEy9CBHKYUSdnY1hdhKDCX7julVZHy3imOiR-XrU7bUNQ/viewform?usp=sf_link).
|
58
|
+
#
|
59
|
+
# An HTTP task is a task that has
|
60
|
+
# {Google::Cloud::Tasks::V2beta3::HttpRequest HttpRequest} set.
|
47
61
|
# @!attribute [rw] schedule_time
|
48
62
|
# @return [Google::Protobuf::Timestamp]
|
49
63
|
# The time when the task is scheduled to be attempted.
|
@@ -61,7 +75,8 @@ module Google
|
|
61
75
|
# The deadline for requests sent to the worker. If the worker does not
|
62
76
|
# respond by this deadline then the request is cancelled and the attempt
|
63
77
|
# is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
|
64
|
-
# task according to the
|
78
|
+
# task according to the
|
79
|
+
# {Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}.
|
65
80
|
#
|
66
81
|
# Note that when the request is cancelled, Cloud Tasks will stop listing for
|
67
82
|
# the response, but whether the worker stops processing depends on the
|
@@ -70,10 +85,15 @@ module Google
|
|
70
85
|
#
|
71
86
|
# The default and maximum values depend on the type of request:
|
72
87
|
#
|
88
|
+
# * For {Google::Cloud::Tasks::V2beta3::HttpRequest HTTP tasks}, the default is
|
89
|
+
# 10 minutes.
|
90
|
+
# The deadline must be in the interval [15 seconds, 30 minutes].
|
73
91
|
#
|
74
|
-
# * For {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks},
|
92
|
+
# * For {Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest App Engine tasks},
|
93
|
+
# 0 indicates that the
|
75
94
|
# request has the default deadline. The default deadline depends on the
|
76
|
-
# [scaling
|
95
|
+
# [scaling
|
96
|
+
# type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
|
77
97
|
# of the service: 10 minutes for standard apps with automatic scaling, 24
|
78
98
|
# hours for standard apps with manual and basic scaling, and 60 minutes for
|
79
99
|
# flex apps. If the request deadline is set, it must be in the interval [15
|
@@ -90,7 +110,7 @@ module Google
|
|
90
110
|
# @return [Integer]
|
91
111
|
# Output only. The number of attempts dispatched.
|
92
112
|
#
|
93
|
-
# This count includes
|
113
|
+
# This count includes attempts which have been dispatched but haven't
|
94
114
|
# received a response.
|
95
115
|
# @!attribute [rw] response_count
|
96
116
|
# @return [Integer]
|
@@ -99,17 +119,19 @@ module Google
|
|
99
119
|
# @return [Google::Cloud::Tasks::V2beta3::Attempt]
|
100
120
|
# Output only. The status of the task's first attempt.
|
101
121
|
#
|
102
|
-
# Only {Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will
|
103
|
-
# The other {Google::Cloud::Tasks::V2beta3::Attempt Attempt} information
|
122
|
+
# Only {Google::Cloud::Tasks::V2beta3::Attempt#dispatch_time dispatch_time} will
|
123
|
+
# be set. The other {Google::Cloud::Tasks::V2beta3::Attempt Attempt} information
|
124
|
+
# is not retained by Cloud Tasks.
|
104
125
|
# @!attribute [rw] last_attempt
|
105
126
|
# @return [Google::Cloud::Tasks::V2beta3::Attempt]
|
106
127
|
# Output only. The status of the task's last attempt.
|
107
128
|
# @!attribute [rw] view
|
108
129
|
# @return [Google::Cloud::Tasks::V2beta3::Task::View]
|
109
|
-
# Output only. The view specifies which subset of the
|
110
|
-
# been returned.
|
130
|
+
# Output only. The view specifies which subset of the
|
131
|
+
# {Google::Cloud::Tasks::V2beta3::Task Task} has been returned.
|
111
132
|
class Task
|
112
|
-
# The view specifies a subset of {Google::Cloud::Tasks::V2beta3::Task Task}
|
133
|
+
# The view specifies a subset of {Google::Cloud::Tasks::V2beta3::Task Task}
|
134
|
+
# data.
|
113
135
|
#
|
114
136
|
# When a task is returned in a response, not all
|
115
137
|
# information is retrieved by default because some data, such as
|
@@ -124,7 +146,8 @@ module Google
|
|
124
146
|
# sensitive data.
|
125
147
|
#
|
126
148
|
# This view does not include the
|
127
|
-
#
|
149
|
+
# [body in
|
150
|
+
# AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body].
|
128
151
|
# Bodies are desirable to return only when needed, because they
|
129
152
|
# can be large and because of the sensitivity of the data that you
|
130
153
|
# choose to store in it.
|
@@ -132,9 +155,10 @@ module Google
|
|
132
155
|
|
133
156
|
# All information is returned.
|
134
157
|
#
|
135
|
-
# Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL}
|
136
|
-
# `cloudtasks.tasks.fullView` [Google
|
137
|
-
# permission on the
|
158
|
+
# Authorization for {Google::Cloud::Tasks::V2beta3::Task::View::FULL FULL}
|
159
|
+
# requires `cloudtasks.tasks.fullView` [Google
|
160
|
+
# IAM](https://cloud.google.com/iam/) permission on the
|
161
|
+
# {Google::Cloud::Tasks::V2beta3::Queue Queue} resource.
|
138
162
|
FULL = 2
|
139
163
|
end
|
140
164
|
end
|
@@ -15,24 +15,25 @@
|
|
15
15
|
|
16
16
|
module Google
|
17
17
|
module Rpc
|
18
|
-
# The `Status` type defines a logical error model that is suitable for
|
19
|
-
# programming environments, including REST APIs and RPC APIs. It is
|
20
|
-
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
18
|
+
# The `Status` type defines a logical error model that is suitable for
|
19
|
+
# different programming environments, including REST APIs and RPC APIs. It is
|
20
|
+
# used by [gRPC](https://github.com/grpc). The error model is designed to be:
|
21
21
|
#
|
22
22
|
# * Simple to use and understand for most users
|
23
23
|
# * Flexible enough to meet unexpected needs
|
24
24
|
#
|
25
25
|
# = Overview
|
26
26
|
#
|
27
|
-
# The `Status` message contains three pieces of data: error code, error
|
28
|
-
# and error details. The error code should be an enum value of
|
29
|
-
# {Google::Rpc::Code}, but it may accept additional error codes
|
30
|
-
# error message should be a developer-facing English message
|
31
|
-
# developers *understand* and *resolve* the error. If a localized
|
32
|
-
# error message is needed, put the localized message in the error
|
33
|
-
# localize it in the client. The optional error details may contain
|
34
|
-
# information about the error. There is a predefined set of error
|
35
|
-
# in the package `google.rpc` that can be used for common error
|
27
|
+
# The `Status` message contains three pieces of data: error code, error
|
28
|
+
# message, and error details. The error code should be an enum value of
|
29
|
+
# {Google::Rpc::Code}, but it may accept additional error codes
|
30
|
+
# if needed. The error message should be a developer-facing English message
|
31
|
+
# that helps developers *understand* and *resolve* the error. If a localized
|
32
|
+
# user-facing error message is needed, put the localized message in the error
|
33
|
+
# details or localize it in the client. The optional error details may contain
|
34
|
+
# arbitrary information about the error. There is a predefined set of error
|
35
|
+
# detail types in the package `google.rpc` that can be used for common error
|
36
|
+
# conditions.
|
36
37
|
#
|
37
38
|
# = Language mapping
|
38
39
|
#
|
@@ -69,12 +70,14 @@ module Google
|
|
69
70
|
# be used directly after any stripping needed for security/privacy reasons.
|
70
71
|
# @!attribute [rw] code
|
71
72
|
# @return [Integer]
|
72
|
-
# The status code, which should be an enum value of
|
73
|
+
# The status code, which should be an enum value of
|
74
|
+
# {Google::Rpc::Code}.
|
73
75
|
# @!attribute [rw] message
|
74
76
|
# @return [String]
|
75
77
|
# A developer-facing error message, which should be in English. Any
|
76
78
|
# user-facing error message should be localized and sent in the
|
77
|
-
# {Google::Rpc::Status#details} field, or localized
|
79
|
+
# {Google::Rpc::Status#details} field, or localized
|
80
|
+
# by the client.
|
78
81
|
# @!attribute [rw] details
|
79
82
|
# @return [Array<Google::Protobuf::Any>]
|
80
83
|
# A list of messages that carry the error details. There is a common set of
|
@@ -6,6 +6,12 @@ require 'google/protobuf'
|
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "google.cloud.tasks.v2beta3.HttpRequest" do
|
10
|
+
optional :url, :string, 1
|
11
|
+
optional :http_method, :enum, 2, "google.cloud.tasks.v2beta3.HttpMethod"
|
12
|
+
map :headers, :string, :string, 3
|
13
|
+
optional :body, :bytes, 4
|
14
|
+
end
|
9
15
|
add_message "google.cloud.tasks.v2beta3.AppEngineHttpQueue" do
|
10
16
|
optional :app_engine_routing_override, :message, 1, "google.cloud.tasks.v2beta3.AppEngineRouting"
|
11
17
|
end
|
@@ -38,6 +44,7 @@ module Google
|
|
38
44
|
module Cloud
|
39
45
|
module Tasks
|
40
46
|
module V2beta3
|
47
|
+
HttpRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.HttpRequest").msgclass
|
41
48
|
AppEngineHttpQueue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineHttpQueue").msgclass
|
42
49
|
AppEngineHttpRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineHttpRequest").msgclass
|
43
50
|
AppEngineRouting = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.AppEngineRouting").msgclass
|
@@ -22,6 +22,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
22
22
|
optional :view, :enum, 10, "google.cloud.tasks.v2beta3.Task.View"
|
23
23
|
oneof :payload_type do
|
24
24
|
optional :app_engine_http_request, :message, 3, "google.cloud.tasks.v2beta3.AppEngineHttpRequest"
|
25
|
+
optional :http_request, :message, 11, "google.cloud.tasks.v2beta3.HttpRequest"
|
25
26
|
end
|
26
27
|
end
|
27
28
|
add_enum "google.cloud.tasks.v2beta3.Task.View" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.64.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.64.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|