google-cloud-tasks 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,126 @@
1
+ {
2
+ "interfaces": {
3
+ "google.cloud.tasks.v2beta2.CloudTasks": {
4
+ "retry_codes": {
5
+ "idempotent": [
6
+ "DEADLINE_EXCEEDED",
7
+ "UNAVAILABLE"
8
+ ],
9
+ "non_idempotent": []
10
+ },
11
+ "retry_params": {
12
+ "default": {
13
+ "initial_retry_delay_millis": 100,
14
+ "retry_delay_multiplier": 1.3,
15
+ "max_retry_delay_millis": 60000,
16
+ "initial_rpc_timeout_millis": 20000,
17
+ "rpc_timeout_multiplier": 1.0,
18
+ "max_rpc_timeout_millis": 20000,
19
+ "total_timeout_millis": 600000
20
+ }
21
+ },
22
+ "methods": {
23
+ "ListQueues": {
24
+ "timeout_millis": 10000,
25
+ "retry_codes_name": "idempotent",
26
+ "retry_params_name": "default"
27
+ },
28
+ "GetQueue": {
29
+ "timeout_millis": 10000,
30
+ "retry_codes_name": "idempotent",
31
+ "retry_params_name": "default"
32
+ },
33
+ "CreateQueue": {
34
+ "timeout_millis": 10000,
35
+ "retry_codes_name": "non_idempotent",
36
+ "retry_params_name": "default"
37
+ },
38
+ "UpdateQueue": {
39
+ "timeout_millis": 10000,
40
+ "retry_codes_name": "non_idempotent",
41
+ "retry_params_name": "default"
42
+ },
43
+ "DeleteQueue": {
44
+ "timeout_millis": 10000,
45
+ "retry_codes_name": "non_idempotent",
46
+ "retry_params_name": "default"
47
+ },
48
+ "PurgeQueue": {
49
+ "timeout_millis": 10000,
50
+ "retry_codes_name": "non_idempotent",
51
+ "retry_params_name": "default"
52
+ },
53
+ "PauseQueue": {
54
+ "timeout_millis": 10000,
55
+ "retry_codes_name": "non_idempotent",
56
+ "retry_params_name": "default"
57
+ },
58
+ "ResumeQueue": {
59
+ "timeout_millis": 10000,
60
+ "retry_codes_name": "non_idempotent",
61
+ "retry_params_name": "default"
62
+ },
63
+ "GetIamPolicy": {
64
+ "timeout_millis": 10000,
65
+ "retry_codes_name": "idempotent",
66
+ "retry_params_name": "default"
67
+ },
68
+ "SetIamPolicy": {
69
+ "timeout_millis": 10000,
70
+ "retry_codes_name": "non_idempotent",
71
+ "retry_params_name": "default"
72
+ },
73
+ "TestIamPermissions": {
74
+ "timeout_millis": 10000,
75
+ "retry_codes_name": "idempotent",
76
+ "retry_params_name": "default"
77
+ },
78
+ "ListTasks": {
79
+ "timeout_millis": 10000,
80
+ "retry_codes_name": "idempotent",
81
+ "retry_params_name": "default"
82
+ },
83
+ "GetTask": {
84
+ "timeout_millis": 10000,
85
+ "retry_codes_name": "idempotent",
86
+ "retry_params_name": "default"
87
+ },
88
+ "CreateTask": {
89
+ "timeout_millis": 10000,
90
+ "retry_codes_name": "non_idempotent",
91
+ "retry_params_name": "default"
92
+ },
93
+ "DeleteTask": {
94
+ "timeout_millis": 10000,
95
+ "retry_codes_name": "idempotent",
96
+ "retry_params_name": "default"
97
+ },
98
+ "LeaseTasks": {
99
+ "timeout_millis": 10000,
100
+ "retry_codes_name": "non_idempotent",
101
+ "retry_params_name": "default"
102
+ },
103
+ "AcknowledgeTask": {
104
+ "timeout_millis": 10000,
105
+ "retry_codes_name": "non_idempotent",
106
+ "retry_params_name": "default"
107
+ },
108
+ "RenewLease": {
109
+ "timeout_millis": 10000,
110
+ "retry_codes_name": "non_idempotent",
111
+ "retry_params_name": "default"
112
+ },
113
+ "CancelLease": {
114
+ "timeout_millis": 10000,
115
+ "retry_codes_name": "non_idempotent",
116
+ "retry_params_name": "default"
117
+ },
118
+ "RunTask": {
119
+ "timeout_millis": 10000,
120
+ "retry_codes_name": "non_idempotent",
121
+ "retry_params_name": "default"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,130 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/tasks/v2beta2/cloudtasks.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/cloud/tasks/v2beta2/queue_pb'
8
+ require 'google/cloud/tasks/v2beta2/task_pb'
9
+ require 'google/iam/v1/iam_policy_pb'
10
+ require 'google/iam/v1/policy_pb'
11
+ require 'google/protobuf/duration_pb'
12
+ require 'google/protobuf/empty_pb'
13
+ require 'google/protobuf/field_mask_pb'
14
+ require 'google/protobuf/timestamp_pb'
15
+ Google::Protobuf::DescriptorPool.generated_pool.build do
16
+ add_message "google.cloud.tasks.v2beta2.ListQueuesRequest" do
17
+ optional :parent, :string, 1
18
+ optional :filter, :string, 2
19
+ optional :page_size, :int32, 3
20
+ optional :page_token, :string, 4
21
+ end
22
+ add_message "google.cloud.tasks.v2beta2.ListQueuesResponse" do
23
+ repeated :queues, :message, 1, "google.cloud.tasks.v2beta2.Queue"
24
+ optional :next_page_token, :string, 2
25
+ end
26
+ add_message "google.cloud.tasks.v2beta2.GetQueueRequest" do
27
+ optional :name, :string, 1
28
+ end
29
+ add_message "google.cloud.tasks.v2beta2.CreateQueueRequest" do
30
+ optional :parent, :string, 1
31
+ optional :queue, :message, 2, "google.cloud.tasks.v2beta2.Queue"
32
+ end
33
+ add_message "google.cloud.tasks.v2beta2.UpdateQueueRequest" do
34
+ optional :queue, :message, 1, "google.cloud.tasks.v2beta2.Queue"
35
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
36
+ end
37
+ add_message "google.cloud.tasks.v2beta2.DeleteQueueRequest" do
38
+ optional :name, :string, 1
39
+ end
40
+ add_message "google.cloud.tasks.v2beta2.PurgeQueueRequest" do
41
+ optional :name, :string, 1
42
+ end
43
+ add_message "google.cloud.tasks.v2beta2.PauseQueueRequest" do
44
+ optional :name, :string, 1
45
+ end
46
+ add_message "google.cloud.tasks.v2beta2.ResumeQueueRequest" do
47
+ optional :name, :string, 1
48
+ end
49
+ add_message "google.cloud.tasks.v2beta2.ListTasksRequest" do
50
+ optional :parent, :string, 1
51
+ optional :response_view, :enum, 2, "google.cloud.tasks.v2beta2.Task.View"
52
+ optional :order_by, :string, 3
53
+ optional :page_size, :int32, 4
54
+ optional :page_token, :string, 5
55
+ end
56
+ add_message "google.cloud.tasks.v2beta2.ListTasksResponse" do
57
+ repeated :tasks, :message, 1, "google.cloud.tasks.v2beta2.Task"
58
+ optional :next_page_token, :string, 2
59
+ end
60
+ add_message "google.cloud.tasks.v2beta2.GetTaskRequest" do
61
+ optional :name, :string, 1
62
+ optional :response_view, :enum, 2, "google.cloud.tasks.v2beta2.Task.View"
63
+ end
64
+ add_message "google.cloud.tasks.v2beta2.CreateTaskRequest" do
65
+ optional :parent, :string, 1
66
+ optional :task, :message, 2, "google.cloud.tasks.v2beta2.Task"
67
+ optional :response_view, :enum, 3, "google.cloud.tasks.v2beta2.Task.View"
68
+ end
69
+ add_message "google.cloud.tasks.v2beta2.DeleteTaskRequest" do
70
+ optional :name, :string, 1
71
+ end
72
+ add_message "google.cloud.tasks.v2beta2.LeaseTasksRequest" do
73
+ optional :parent, :string, 1
74
+ optional :max_tasks, :int32, 2
75
+ optional :lease_duration, :message, 3, "google.protobuf.Duration"
76
+ optional :response_view, :enum, 4, "google.cloud.tasks.v2beta2.Task.View"
77
+ optional :filter, :string, 5
78
+ end
79
+ add_message "google.cloud.tasks.v2beta2.LeaseTasksResponse" do
80
+ repeated :tasks, :message, 1, "google.cloud.tasks.v2beta2.Task"
81
+ end
82
+ add_message "google.cloud.tasks.v2beta2.AcknowledgeTaskRequest" do
83
+ optional :name, :string, 1
84
+ optional :schedule_time, :message, 2, "google.protobuf.Timestamp"
85
+ end
86
+ add_message "google.cloud.tasks.v2beta2.RenewLeaseRequest" do
87
+ optional :name, :string, 1
88
+ optional :schedule_time, :message, 2, "google.protobuf.Timestamp"
89
+ optional :lease_duration, :message, 3, "google.protobuf.Duration"
90
+ optional :response_view, :enum, 4, "google.cloud.tasks.v2beta2.Task.View"
91
+ end
92
+ add_message "google.cloud.tasks.v2beta2.CancelLeaseRequest" do
93
+ optional :name, :string, 1
94
+ optional :schedule_time, :message, 2, "google.protobuf.Timestamp"
95
+ optional :response_view, :enum, 3, "google.cloud.tasks.v2beta2.Task.View"
96
+ end
97
+ add_message "google.cloud.tasks.v2beta2.RunTaskRequest" do
98
+ optional :name, :string, 1
99
+ optional :response_view, :enum, 2, "google.cloud.tasks.v2beta2.Task.View"
100
+ end
101
+ end
102
+
103
+ module Google
104
+ module Cloud
105
+ module Tasks
106
+ module V2beta2
107
+ ListQueuesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesRequest").msgclass
108
+ ListQueuesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListQueuesResponse").msgclass
109
+ GetQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetQueueRequest").msgclass
110
+ CreateQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateQueueRequest").msgclass
111
+ UpdateQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.UpdateQueueRequest").msgclass
112
+ DeleteQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteQueueRequest").msgclass
113
+ PurgeQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PurgeQueueRequest").msgclass
114
+ PauseQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.PauseQueueRequest").msgclass
115
+ ResumeQueueRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ResumeQueueRequest").msgclass
116
+ ListTasksRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksRequest").msgclass
117
+ ListTasksResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.ListTasksResponse").msgclass
118
+ GetTaskRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.GetTaskRequest").msgclass
119
+ CreateTaskRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CreateTaskRequest").msgclass
120
+ DeleteTaskRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.DeleteTaskRequest").msgclass
121
+ LeaseTasksRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksRequest").msgclass
122
+ LeaseTasksResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.LeaseTasksResponse").msgclass
123
+ AcknowledgeTaskRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.AcknowledgeTaskRequest").msgclass
124
+ RenewLeaseRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RenewLeaseRequest").msgclass
125
+ CancelLeaseRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.CancelLeaseRequest").msgclass
126
+ RunTaskRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.tasks.v2beta2.RunTaskRequest").msgclass
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,258 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: google/cloud/tasks/v2beta2/cloudtasks.proto for package 'google.cloud.tasks.v2beta2'
3
+ # Original file comments:
4
+ # Copyright 2018 Google Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'grpc'
20
+ require 'google/cloud/tasks/v2beta2/cloudtasks_pb'
21
+
22
+ module Google
23
+ module Cloud
24
+ module Tasks
25
+ module V2beta2
26
+ module CloudTasks
27
+ # Cloud Tasks allows developers to manage the execution of background
28
+ # work in their applications.
29
+ class Service
30
+
31
+ include GRPC::GenericService
32
+
33
+ self.marshal_class_method = :encode
34
+ self.unmarshal_class_method = :decode
35
+ self.service_name = 'google.cloud.tasks.v2beta2.CloudTasks'
36
+
37
+ # Lists queues.
38
+ #
39
+ # Queues are returned in lexicographical order.
40
+ rpc :ListQueues, ListQueuesRequest, ListQueuesResponse
41
+ # Gets a queue.
42
+ rpc :GetQueue, GetQueueRequest, Queue
43
+ # Creates a queue.
44
+ #
45
+ # Queues created with this method allow tasks to live for a maximum of 31
46
+ # days. After a task is 31 days old, the task will be deleted regardless of whether
47
+ # it was dispatched or not.
48
+ #
49
+ # WARNING: Using this method may have unintended side effects if you are
50
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
51
+ # Read
52
+ # [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
53
+ # before using this method.
54
+ rpc :CreateQueue, CreateQueueRequest, Queue
55
+ # Updates a queue.
56
+ #
57
+ # This method creates the queue if it does not exist and updates
58
+ # the queue if it does exist.
59
+ #
60
+ # Queues created with this method allow tasks to live for a maximum of 31
61
+ # days. After a task is 31 days old, the task will be deleted regardless of whether
62
+ # it was dispatched or not.
63
+ #
64
+ # WARNING: Using this method may have unintended side effects if you are
65
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
66
+ # Read
67
+ # [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
68
+ # before using this method.
69
+ rpc :UpdateQueue, UpdateQueueRequest, Queue
70
+ # Deletes a queue.
71
+ #
72
+ # This command will delete the queue even if it has tasks in it.
73
+ #
74
+ # Note: If you delete a queue, a queue with the same name can't be created
75
+ # for 7 days.
76
+ #
77
+ # WARNING: Using this method may have unintended side effects if you are
78
+ # using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
79
+ # Read
80
+ # [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
81
+ # before using this method.
82
+ rpc :DeleteQueue, DeleteQueueRequest, Google::Protobuf::Empty
83
+ # Purges a queue by deleting all of its tasks.
84
+ #
85
+ # All tasks created before this method is called are permanently deleted.
86
+ #
87
+ # Purge operations can take up to one minute to take effect. Tasks
88
+ # might be dispatched before the purge takes effect. A purge is irreversible.
89
+ rpc :PurgeQueue, PurgeQueueRequest, Queue
90
+ # Pauses the queue.
91
+ #
92
+ # If a queue is paused then the system will stop dispatching tasks
93
+ # until the queue is resumed via
94
+ # [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
95
+ # when the queue is paused. A queue is paused if its
96
+ # [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
97
+ rpc :PauseQueue, PauseQueueRequest, Queue
98
+ # Resume a queue.
99
+ #
100
+ # This method resumes a queue after it has been
101
+ # [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
102
+ # [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
103
+ # in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
104
+ # will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
105
+ #
106
+ # WARNING: Resuming many high-QPS queues at the same time can
107
+ # lead to target overloading. If you are resuming high-QPS
108
+ # queues, follow the 500/50/5 pattern described in
109
+ # [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).
110
+ rpc :ResumeQueue, ResumeQueueRequest, Queue
111
+ # Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
112
+ # Returns an empty policy if the resource exists and does not have a policy
113
+ # set.
114
+ #
115
+ # Authorization requires the following [Google IAM](/iam) permission on the
116
+ # specified resource parent:
117
+ #
118
+ # * `cloudtasks.queues.getIamPolicy`
119
+ rpc :GetIamPolicy, Google::Iam::V1::GetIamPolicyRequest, Google::Iam::V1::Policy
120
+ # Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
121
+ # policy.
122
+ #
123
+ # Note: The Cloud Console does not check queue-level IAM permissions yet.
124
+ # Project-level permissions are required to use the Cloud Console.
125
+ #
126
+ # Authorization requires the following [Google IAM](/iam) permission on the
127
+ # specified resource parent:
128
+ #
129
+ # * `cloudtasks.queues.setIamPolicy`
130
+ rpc :SetIamPolicy, Google::Iam::V1::SetIamPolicyRequest, Google::Iam::V1::Policy
131
+ # Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
132
+ # If the resource does not exist, this will return an empty set of
133
+ # permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
134
+ #
135
+ # Note: This operation is designed to be used for building permission-aware
136
+ # UIs and command-line tools, not for authorization checking. This operation
137
+ # may "fail open" without warning.
138
+ rpc :TestIamPermissions, Google::Iam::V1::TestIamPermissionsRequest, Google::Iam::V1::TestIamPermissionsResponse
139
+ # Lists the tasks in a queue.
140
+ #
141
+ # By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
142
+ # due to performance considerations;
143
+ # [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
144
+ # subset of information which is returned.
145
+ rpc :ListTasks, ListTasksRequest, ListTasksResponse
146
+ # Gets a task.
147
+ rpc :GetTask, GetTaskRequest, Task
148
+ # Creates a task and adds it to a queue.
149
+ #
150
+ # To add multiple tasks at the same time, use
151
+ # [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
152
+ # or the batching documentation for your client library, for example
153
+ # https://developers.google.com/api-client-library/python/guide/batch.
154
+ #
155
+ # Tasks cannot be updated after creation; there is no UpdateTask command.
156
+ #
157
+ # * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
158
+ # the maximum task size is 100KB.
159
+ # * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this
160
+ # the maximum task size is 1MB.
161
+ rpc :CreateTask, CreateTaskRequest, Task
162
+ # Deletes a task.
163
+ #
164
+ # A task can be deleted if it is scheduled or dispatched. A task
165
+ # cannot be deleted if it has completed successfully or permanently
166
+ # failed.
167
+ rpc :DeleteTask, DeleteTaskRequest, Google::Protobuf::Empty
168
+ # Leases tasks from a pull queue for
169
+ # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
170
+ #
171
+ # This method is invoked by the worker to obtain a lease. The
172
+ # worker must acknowledge the task via
173
+ # [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
174
+ # performed the work associated with the task.
175
+ #
176
+ # The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
177
+ # the worker needs to perform the work associated with the task. To
178
+ # return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
179
+ # [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
180
+ # [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
181
+ #
182
+ # A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
183
+ # requests are allowed per
184
+ # queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
185
+ # is returned when this limit is
186
+ # exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
187
+ # is also returned when
188
+ # [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
189
+ # is exceeded.
190
+ rpc :LeaseTasks, LeaseTasksRequest, LeaseTasksResponse
191
+ # Acknowledges a pull task.
192
+ #
193
+ # The worker, that is, the entity that
194
+ # [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
195
+ # to indicate that the work associated with the task has finished.
196
+ #
197
+ # The worker must acknowledge a task within the
198
+ # [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
199
+ # will expire and the task will become available to be leased
200
+ # again. After the task is acknowledged, it will not be returned
201
+ # by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
202
+ # [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
203
+ # [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
204
+ #
205
+ # To acknowledge multiple tasks at the same time, use
206
+ # [HTTP batching](/storage/docs/json_api/v1/how-tos/batch)
207
+ # or the batching documentation for your client library, for example
208
+ # https://developers.google.com/api-client-library/python/guide/batch.
209
+ rpc :AcknowledgeTask, AcknowledgeTaskRequest, Google::Protobuf::Empty
210
+ # Renew the current lease of a pull task.
211
+ #
212
+ # The worker can use this method to extend the lease by a new
213
+ # duration, starting from now. The new task lease will be
214
+ # returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
215
+ rpc :RenewLease, RenewLeaseRequest, Task
216
+ # Cancel a pull task's lease.
217
+ #
218
+ # The worker can use this method to cancel a task's lease by
219
+ # setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
220
+ # make the task available to be leased to the next caller of
221
+ # [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
222
+ rpc :CancelLease, CancelLeaseRequest, Task
223
+ # Forces a task to run now.
224
+ #
225
+ # When this method is called, Cloud Tasks will dispatch the task, even if
226
+ # the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
227
+ # is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
228
+ #
229
+ # This command is meant to be used for manual debugging. For
230
+ # example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
231
+ # task after a fix has been made or to manually force a task to be
232
+ # dispatched now.
233
+ #
234
+ # The dispatched task is returned. That is, the task that is returned
235
+ # contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
236
+ # before the task is received by its target.
237
+ #
238
+ # If Cloud Tasks receives a successful response from the task's
239
+ # target, then the task will be deleted; otherwise the task's
240
+ # [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
241
+ # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
242
+ # in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
243
+ #
244
+ # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
245
+ # [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
246
+ # task that has already succeeded or permanently failed.
247
+ #
248
+ # [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
249
+ # [pull task][google.cloud.tasks.v2beta2.PullMessage].
250
+ rpc :RunTask, RunTaskRequest, Task
251
+ end
252
+
253
+ Stub = Service.rpc_stub_class
254
+ end
255
+ end
256
+ end
257
+ end
258
+ end