google-cloud-tasks-v2beta3 0.2.1 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd2c101a95dce9ca72f8e5c50d3dbb8e60ed7763bccf2d4c63730804092024f0
4
- data.tar.gz: 7cf6252cf7a203c11ebb4d73b1cb8b598c2d15204244dc71cb7131bd97ac7b57
3
+ metadata.gz: 3737674c2bcd4c10624167a223a5f9b88cbfe3bea6dc27b5e3aaf00e0ab27dfb
4
+ data.tar.gz: 569a027315fe58ec81eaad334f14aae677770a20151b834728087703a2ccb1d3
5
5
  SHA512:
6
- metadata.gz: 9055986e76fbc34951c1d11620802add5e2f895892a1233d0e5d8a0dfb508e1ef2a6310a6d43cffefb21457046ba04b284bd412f850f8240a635dbfa0f68e80c
7
- data.tar.gz: fea7c211bda9167b0f54454f7e548faa068a817feaf18e4f07dacf1985d2c489dbf6f47bff3ff2c7769eeed08ce54733f86da823eaf4d87dbe6f00489d85e2e7
6
+ metadata.gz: 4c8c786a7be7f0041657c90fb134cb2d2ef087d7c39f4fac782f27b3c1271193c3d904332c899b3ceec8a09156765773c2476389b777c05859049c6d57dd4f63
7
+ data.tar.gz: 7b84f4096d19b4ec705375119f04e091dc1a1740645b2fc8e145207dfd98eb6f46953caf779556eec213ef6caf75639a2b44d815ec90d18b44639404ce8c3c54
data/README.md CHANGED
@@ -18,6 +18,7 @@ In order to use this library, you first need to go through the following steps:
18
18
 
19
19
  1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
20
20
  1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
21
+ 1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudtasks.googleapis.com)
21
22
  1. {file:AUTHENTICATION.md Set up authentication.}
22
23
 
23
24
  ## Quick Start
@@ -33,6 +34,9 @@ response = client.list_queues request
33
34
  View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-tasks-v2beta3/latest)
34
35
  for class and method documentation.
35
36
 
37
+ See also the [Product Documentation](https://cloud.google.com/tasks)
38
+ for general usage information.
39
+
36
40
  ## Enabling Logging
37
41
 
38
42
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
@@ -71,7 +71,7 @@ module Google
71
71
  initial_delay: 0.1,
72
72
  max_delay: 10.0,
73
73
  multiplier: 1.3,
74
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
74
+ retry_codes: [4, 14]
75
75
  }
76
76
 
77
77
  default_config.rpcs.get_queue.timeout = 10.0
@@ -79,7 +79,7 @@ module Google
79
79
  initial_delay: 0.1,
80
80
  max_delay: 10.0,
81
81
  multiplier: 1.3,
82
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
82
+ retry_codes: [4, 14]
83
83
  }
84
84
 
85
85
  default_config.rpcs.create_queue.timeout = 10.0
@@ -91,7 +91,7 @@ module Google
91
91
  initial_delay: 0.1,
92
92
  max_delay: 10.0,
93
93
  multiplier: 1.3,
94
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
94
+ retry_codes: [4, 14]
95
95
  }
96
96
 
97
97
  default_config.rpcs.purge_queue.timeout = 10.0
@@ -105,7 +105,7 @@ module Google
105
105
  initial_delay: 0.1,
106
106
  max_delay: 10.0,
107
107
  multiplier: 1.3,
108
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
108
+ retry_codes: [4, 14]
109
109
  }
110
110
 
111
111
  default_config.rpcs.set_iam_policy.timeout = 10.0
@@ -115,7 +115,7 @@ module Google
115
115
  initial_delay: 0.1,
116
116
  max_delay: 10.0,
117
117
  multiplier: 1.3,
118
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
118
+ retry_codes: [4, 14]
119
119
  }
120
120
 
121
121
  default_config.rpcs.list_tasks.timeout = 10.0
@@ -123,7 +123,7 @@ module Google
123
123
  initial_delay: 0.1,
124
124
  max_delay: 10.0,
125
125
  multiplier: 1.3,
126
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
126
+ retry_codes: [4, 14]
127
127
  }
128
128
 
129
129
  default_config.rpcs.get_task.timeout = 10.0
@@ -131,7 +131,7 @@ module Google
131
131
  initial_delay: 0.1,
132
132
  max_delay: 10.0,
133
133
  multiplier: 1.3,
134
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
134
+ retry_codes: [4, 14]
135
135
  }
136
136
 
137
137
  default_config.rpcs.create_task.timeout = 10.0
@@ -141,7 +141,7 @@ module Google
141
141
  initial_delay: 0.1,
142
142
  max_delay: 10.0,
143
143
  multiplier: 1.3,
144
- retry_codes: ["DEADLINE_EXCEEDED", "UNAVAILABLE"]
144
+ retry_codes: [4, 14]
145
145
  }
146
146
 
147
147
  default_config.rpcs.run_task.timeout = 10.0
@@ -1675,7 +1675,7 @@ module Google
1675
1675
 
1676
1676
  config_attr :endpoint, "cloudtasks.googleapis.com", ::String
1677
1677
  config_attr :credentials, nil do |value|
1678
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1678
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1679
1679
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
1680
1680
  allowed.any? { |klass| klass === value }
1681
1681
  end
@@ -1703,7 +1703,7 @@ module Google
1703
1703
  def rpcs
1704
1704
  @rpcs ||= begin
1705
1705
  parent_rpcs = nil
1706
- parent_rpcs = @parent_config.rpcs if @parent_config&.respond_to? :rpcs
1706
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
1707
1707
  Rpcs.new parent_rpcs
1708
1708
  end
1709
1709
  end
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/cloud/tasks/v2beta3/cloudtasks.proto for package 'google.cloud.tasks.v2beta3'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2020 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/cloud/tasks/v2beta3/cloudtasks_pb'
@@ -38,9 +37,9 @@ module Google
38
37
  # Lists queues.
39
38
  #
40
39
  # Queues are returned in lexicographical order.
41
- rpc :ListQueues, ListQueuesRequest, ListQueuesResponse
40
+ rpc :ListQueues, Google::Cloud::Tasks::V2beta3::ListQueuesRequest, Google::Cloud::Tasks::V2beta3::ListQueuesResponse
42
41
  # Gets a queue.
43
- rpc :GetQueue, GetQueueRequest, Queue
42
+ rpc :GetQueue, Google::Cloud::Tasks::V2beta3::GetQueueRequest, Google::Cloud::Tasks::V2beta3::Queue
44
43
  # Creates a queue.
45
44
  #
46
45
  # Queues created with this method allow tasks to live for a maximum of 31
@@ -53,7 +52,7 @@ module Google
53
52
  # [Overview of Queue Management and
54
53
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
55
54
  # this method.
56
- rpc :CreateQueue, CreateQueueRequest, Queue
55
+ rpc :CreateQueue, Google::Cloud::Tasks::V2beta3::CreateQueueRequest, Google::Cloud::Tasks::V2beta3::Queue
57
56
  # Updates a queue.
58
57
  #
59
58
  # This method creates the queue if it does not exist and updates
@@ -69,7 +68,7 @@ module Google
69
68
  # [Overview of Queue Management and
70
69
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
71
70
  # this method.
72
- rpc :UpdateQueue, UpdateQueueRequest, Queue
71
+ rpc :UpdateQueue, Google::Cloud::Tasks::V2beta3::UpdateQueueRequest, Google::Cloud::Tasks::V2beta3::Queue
73
72
  # Deletes a queue.
74
73
  #
75
74
  # This command will delete the queue even if it has tasks in it.
@@ -83,14 +82,14 @@ module Google
83
82
  # [Overview of Queue Management and
84
83
  # queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
85
84
  # this method.
86
- rpc :DeleteQueue, DeleteQueueRequest, Google::Protobuf::Empty
85
+ rpc :DeleteQueue, Google::Cloud::Tasks::V2beta3::DeleteQueueRequest, Google::Protobuf::Empty
87
86
  # Purges a queue by deleting all of its tasks.
88
87
  #
89
88
  # All tasks created before this method is called are permanently deleted.
90
89
  #
91
90
  # Purge operations can take up to one minute to take effect. Tasks
92
91
  # might be dispatched before the purge takes effect. A purge is irreversible.
93
- rpc :PurgeQueue, PurgeQueueRequest, Queue
92
+ rpc :PurgeQueue, Google::Cloud::Tasks::V2beta3::PurgeQueueRequest, Google::Cloud::Tasks::V2beta3::Queue
94
93
  # Pauses the queue.
95
94
  #
96
95
  # If a queue is paused then the system will stop dispatching tasks
@@ -98,7 +97,7 @@ module Google
98
97
  # [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. Tasks can still be added
99
98
  # when the queue is paused. A queue is paused if its
100
99
  # [state][google.cloud.tasks.v2beta3.Queue.state] is [PAUSED][google.cloud.tasks.v2beta3.Queue.State.PAUSED].
101
- rpc :PauseQueue, PauseQueueRequest, Queue
100
+ rpc :PauseQueue, Google::Cloud::Tasks::V2beta3::PauseQueueRequest, Google::Cloud::Tasks::V2beta3::Queue
102
101
  # Resume a queue.
103
102
  #
104
103
  # This method resumes a queue after it has been
@@ -112,7 +111,7 @@ module Google
112
111
  # queues, follow the 500/50/5 pattern described in
113
112
  # [Managing Cloud Tasks Scaling
114
113
  # Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
115
- rpc :ResumeQueue, ResumeQueueRequest, Queue
114
+ rpc :ResumeQueue, Google::Cloud::Tasks::V2beta3::ResumeQueueRequest, Google::Cloud::Tasks::V2beta3::Queue
116
115
  # Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.Queue].
117
116
  # Returns an empty policy if the resource exists and does not have a policy
118
117
  # set.
@@ -152,21 +151,21 @@ module Google
152
151
  #
153
152
  # The tasks may be returned in any order. The ordering may change at any
154
153
  # time.
155
- rpc :ListTasks, ListTasksRequest, ListTasksResponse
154
+ rpc :ListTasks, Google::Cloud::Tasks::V2beta3::ListTasksRequest, Google::Cloud::Tasks::V2beta3::ListTasksResponse
156
155
  # Gets a task.
157
- rpc :GetTask, GetTaskRequest, Task
156
+ rpc :GetTask, Google::Cloud::Tasks::V2beta3::GetTaskRequest, Google::Cloud::Tasks::V2beta3::Task
158
157
  # Creates a task and adds it to a queue.
159
158
  #
160
159
  # Tasks cannot be updated after creation; there is no UpdateTask command.
161
160
  #
162
161
  # * The maximum task size is 100KB.
163
- rpc :CreateTask, CreateTaskRequest, Task
162
+ rpc :CreateTask, Google::Cloud::Tasks::V2beta3::CreateTaskRequest, Google::Cloud::Tasks::V2beta3::Task
164
163
  # Deletes a task.
165
164
  #
166
165
  # A task can be deleted if it is scheduled or dispatched. A task
167
166
  # cannot be deleted if it has executed successfully or permanently
168
167
  # failed.
169
- rpc :DeleteTask, DeleteTaskRequest, Google::Protobuf::Empty
168
+ rpc :DeleteTask, Google::Cloud::Tasks::V2beta3::DeleteTaskRequest, Google::Protobuf::Empty
170
169
  # Forces a task to run now.
171
170
  #
172
171
  # When this method is called, Cloud Tasks will dispatch the task, even if
@@ -191,7 +190,7 @@ module Google
191
190
  # [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask] returns
192
191
  # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
193
192
  # task that has already succeeded or permanently failed.
194
- rpc :RunTask, RunTaskRequest, Task
193
+ rpc :RunTask, Google::Cloud::Tasks::V2beta3::RunTaskRequest, Google::Cloud::Tasks::V2beta3::Task
195
194
  end
196
195
 
197
196
  Stub = Service.rpc_stub_class
@@ -3,6 +3,7 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/api/field_behavior_pb'
6
7
  require 'google/api/resource_pb'
7
8
  require 'google/cloud/tasks/v2beta3/target_pb'
8
9
  require 'google/protobuf/duration_pb'
@@ -17,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  optional :state, :enum, 6, "google.cloud.tasks.v2beta3.Queue.State"
18
19
  optional :purge_time, :message, 7, "google.protobuf.Timestamp"
19
20
  optional :stackdriver_logging_config, :message, 10, "google.cloud.tasks.v2beta3.StackdriverLoggingConfig"
21
+ optional :type, :enum, 11, "google.cloud.tasks.v2beta3.Queue.Type"
20
22
  oneof :queue_type do
21
23
  optional :app_engine_http_queue, :message, 3, "google.cloud.tasks.v2beta3.AppEngineHttpQueue"
22
24
  end
@@ -27,6 +29,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
29
  value :PAUSED, 2
28
30
  value :DISABLED, 3
29
31
  end
32
+ add_enum "google.cloud.tasks.v2beta3.Queue.Type" do
33
+ value :TYPE_UNSPECIFIED, 0
34
+ value :PULL, 1
35
+ value :PUSH, 2
36
+ end
30
37
  add_message "google.cloud.tasks.v2beta3.RateLimits" do
31
38
  optional :max_dispatches_per_second, :double, 1
32
39
  optional :max_burst_size, :int32, 2
@@ -51,6 +58,7 @@ module Google
51
58
  module V2beta3
52
59
  Queue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue").msgclass
53
60
  Queue::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.State").enummodule
61
+ Queue::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.Queue.Type").enummodule
54
62
  RateLimits = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RateLimits").msgclass
55
63
  RetryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.RetryConfig").msgclass
56
64
  StackdriverLoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta3.StackdriverLoggingConfig").msgclass
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Tasks
23
23
  module V2beta3
24
- VERSION = "0.2.1"
24
+ VERSION = "0.3.2"
25
25
  end
26
26
  end
27
27
  end
@@ -115,6 +115,13 @@ module Google
115
115
  # Configuration options for writing logs to
116
116
  # [Stackdriver Logging](https://cloud.google.com/logging/docs/). If this
117
117
  # field is unset, then no logs are written.
118
+ # @!attribute [rw] type
119
+ # @return [::Google::Cloud::Tasks::V2beta3::Queue::Type]
120
+ # Immutable. The type of a queue (push or pull).
121
+ #
122
+ # `Queue.type` is an immutable property of the queue that is set at the queue
123
+ # creation time. When left unspecified, the default value of `PUSH` is
124
+ # selected.
118
125
  class Queue
119
126
  include ::Google::Protobuf::MessageExts
120
127
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -155,6 +162,18 @@ module Google
155
162
  # {::Google::Cloud::Tasks::V2beta3::CloudTasks::Client#delete_queue DeleteQueue}.
156
163
  DISABLED = 3
157
164
  end
165
+
166
+ # The type of the queue.
167
+ module Type
168
+ # Default value.
169
+ TYPE_UNSPECIFIED = 0
170
+
171
+ # A pull queue.
172
+ PULL = 1
173
+
174
+ # A push queue.
175
+ PUSH = 2
176
+ end
158
177
  end
159
178
 
160
179
  # Rate limits.
@@ -314,7 +333,7 @@ module Google
314
333
  # A task's retry interval starts at
315
334
  # {::Google::Cloud::Tasks::V2beta3::RetryConfig#min_backoff min_backoff}, then doubles
316
335
  # `max_doublings` times, then increases linearly, and finally
317
- # retries retries at intervals of
336
+ # retries at intervals of
318
337
  # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_backoff max_backoff} up to
319
338
  # {::Google::Cloud::Tasks::V2beta3::RetryConfig#max_attempts max_attempts} times.
320
339
  #
@@ -188,10 +188,10 @@ module Google
188
188
  # delivered to can be set at the queue-level or task-level:
189
189
  #
190
190
  # * If set,
191
- # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
192
- # is used for all tasks in the queue, no matter what the setting
193
- # is for the
194
- # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
191
+ # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpQueue#app_engine_routing_override app_engine_routing_override}
192
+ # is used for all tasks in the queue, no matter what the setting
193
+ # is for the
194
+ # {::Google::Cloud::Tasks::V2beta3::AppEngineHttpRequest#app_engine_routing task-level app_engine_routing}.
195
195
  #
196
196
  #
197
197
  # The `url` that the task will be sent to is:
@@ -225,14 +225,11 @@ module Google
225
225
  # The HTTP method to use for the request. The default is POST.
226
226
  #
227
227
  # The app's request handler for the task's target URL must be able to handle
228
- # HTTP requests with this http_method, otherwise the task attempt will fail
229
- # with error code 405 (Method Not Allowed). See
230
- # [Writing a push task request
228
+ # HTTP requests with this http_method, otherwise the task attempt fails with
229
+ # error code 405 (Method Not Allowed). See [Writing a push task request
231
230
  # handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
232
- # and the documentation for the request handlers in the language your app is
233
- # written in e.g.
234
- # [Python Request
235
- # Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
231
+ # and the App Engine documentation for your runtime on [How Requests are
232
+ # Handled](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
236
233
  # @!attribute [rw] app_engine_routing
237
234
  # @return [::Google::Cloud::Tasks::V2beta3::AppEngineRouting]
238
235
  # Task-level setting for App Engine routing.
@@ -73,8 +73,8 @@ module Google
73
73
  # is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
74
74
  # task according to the {::Google::Cloud::Tasks::V2beta3::RetryConfig RetryConfig}.
75
75
  #
76
- # Note that when the request is cancelled, Cloud Tasks will stop listing for
77
- # the response, but whether the worker stops processing depends on the
76
+ # Note that when the request is cancelled, Cloud Tasks will stop listening
77
+ # for the response, but whether the worker stops processing depends on the
78
78
  # worker. For example, if the worker is stuck, it may not react to cancelled
79
79
  # requests.
80
80
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks-v2beta3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-26 00:00:00.000000000 Z
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.2'
19
+ version: '0.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.2'
26
+ version: '0.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0'
233
233
  requirements: []
234
- rubygems_version: 3.0.6
234
+ rubygems_version: 3.1.3
235
235
  signing_key:
236
236
  specification_version: 4
237
237
  summary: API Client library for the Cloud Tasks V2beta3 API