diff --git a/packages/google-cloud-tasks/.coveragerc b/packages/google-cloud-tasks/.coveragerc index b178b094aa1d..dd39c8546c41 100644 --- a/packages/google-cloud-tasks/.coveragerc +++ b/packages/google-cloud-tasks/.coveragerc @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [run] branch = True diff --git a/packages/google-cloud-tasks/.flake8 b/packages/google-cloud-tasks/.flake8 index 0268ecc9c55c..20fe9bda2ee4 100644 --- a/packages/google-cloud-tasks/.flake8 +++ b/packages/google-cloud-tasks/.flake8 @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [flake8] ignore = E203, E266, E501, W503 diff --git a/packages/google-cloud-tasks/.github/ISSUE_TEMPLATE/bug_report.md b/packages/google-cloud-tasks/.github/ISSUE_TEMPLATE/bug_report.md index ec7b7277c442..6166f13c47fe 100644 --- a/packages/google-cloud-tasks/.github/ISSUE_TEMPLATE/bug_report.md +++ b/packages/google-cloud-tasks/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,8 +11,7 @@ Thanks for stopping by to let us know something could be better! Please run down the following list and make sure you've tried the usual "quick fixes": - Search the issues already opened: https://github.com/googleapis/python-tasks/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-python - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+python + - Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python If you are still having issues, please be sure to include as much information as possible: diff --git a/packages/google-cloud-tasks/CONTRIBUTING.rst b/packages/google-cloud-tasks/CONTRIBUTING.rst index e85f6373396c..31d020a2ffe2 100644 --- a/packages/google-cloud-tasks/CONTRIBUTING.rst +++ b/packages/google-cloud-tasks/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: 2.7, - 3.5, 3.6, and 3.7 on both UNIX and Windows. + 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -214,26 +214,18 @@ We support: - `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ +- `Python 3.8`_ .. _Python 3.5: https://docs.python.org/3.5/ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ +.. _Python 3.8: https://docs.python.org/3.8/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-tasks/blob/master/noxfile.py -We explicitly decided not to support `Python 2.5`_ due to `decreased usage`_ -and lack of continuous integration `support`_. - -.. _Python 2.5: https://docs.python.org/2.5/ -.. _decreased usage: https://caremad.io/2013/10/a-look-at-pypi-downloads/ -.. _support: https://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/ - -We have `dropped 2.6`_ as a supported version as well since Python 2.6 is no -longer supported by the core development team. - Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. We also explicitly decided to support Python 3 beginning with version @@ -247,7 +239,6 @@ We also explicitly decided to support Python 3 beginning with version .. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django .. _projects: http://flask.pocoo.org/docs/0.10/python3/ .. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ -.. _dropped 2.6: https://github.com/googleapis/google-cloud-python/issues/995 ********** Versioning diff --git a/packages/google-cloud-tasks/MANIFEST.in b/packages/google-cloud-tasks/MANIFEST.in index cd011be27a0e..68855abc3f02 100644 --- a/packages/google-cloud-tasks/MANIFEST.in +++ b/packages/google-cloud-tasks/MANIFEST.in @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/cloudtasks_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/cloudtasks_pb2.py index 0f61745535ed..14243f137560 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/cloudtasks_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/cloudtasks_pb2.py @@ -971,8 +971,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. - - Attributes: parent: Required. The location name. For example: @@ -1017,8 +1015,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Response message for [ListQueues][google.cloud.tasks.v2.CloudTasks.ListQueues]. - - Attributes: queues: The list of queues. @@ -1044,8 +1040,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [GetQueue][google.cloud.tasks.v2.CloudTasks.GetQueue]. - - Attributes: name: Required. The resource name of the queue. For example: @@ -1064,8 +1058,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [CreateQueue][google.cloud.tasks.v2.CloudTasks.CreateQueue]. - - Attributes: parent: Required. The location name in which the queue will be @@ -1092,8 +1084,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [UpdateQueue][google.cloud.tasks.v2.CloudTasks.UpdateQueue]. - - Attributes: queue: Required. The queue to create or update. The queue's @@ -1119,8 +1109,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [DeleteQueue][google.cloud.tasks.v2.CloudTasks.DeleteQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1139,8 +1127,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [PurgeQueue][google.cloud.tasks.v2.CloudTasks.PurgeQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1159,8 +1145,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [PauseQueue][google.cloud.tasks.v2.CloudTasks.PauseQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1179,8 +1163,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [ResumeQueue][google.cloud.tasks.v2.CloudTasks.ResumeQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1199,8 +1181,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. - - Attributes: parent: Required. The queue name. For example: @@ -1247,8 +1227,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Response message for listing tasks using [ListTasks][google.cloud.tasks.v2.CloudTasks.ListTasks]. - - Attributes: tasks: The list of tasks. @@ -1273,8 +1251,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for getting a task using [GetTask][google.cloud.tasks.v2.CloudTasks.GetTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1306,8 +1282,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask]. - - Attributes: parent: Required. The queue name. For example: @@ -1370,8 +1344,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for deleting a task using [DeleteTask][google.cloud.tasks.v2.CloudTasks.DeleteTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1390,8 +1362,6 @@ __module__="google.cloud.tasks_v2.proto.cloudtasks_pb2", __doc__="""Request message for forcing a task to run now using [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/queue_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/queue_pb2.py index 543ccd3fc761..bcc899053c28 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/queue_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/queue_pb2.py @@ -484,11 +484,9 @@ dict( DESCRIPTOR=_QUEUE, __module__="google.cloud.tasks_v2.proto.queue_pb2", - __doc__="""A queue is a container of related tasks. Queues are - configured to manage how those tasks are dispatched. Configurable - properties include rate limits, retry options, queue types, and others. - - + __doc__="""A queue is a container of related tasks. Queues are configured to + manage how those tasks are dispatched. Configurable properties include + rate limits, retry options, queue types, and others. Attributes: name: Caller-specified and required in @@ -589,18 +587,12 @@ dict( DESCRIPTOR=_RATELIMITS, __module__="google.cloud.tasks_v2.proto.queue_pb2", - __doc__="""Rate limits. - - This message determines the maximum rate that tasks can be dispatched by - a queue, regardless of whether the dispatch is a first task attempt or a - retry. - - Note: The debugging command, + __doc__="""Rate limits. This message determines the maximum rate that tasks can + be dispatched by a queue, regardless of whether the dispatch is a + first task attempt or a retry. Note: The debugging command, [RunTask][google.cloud.tasks.v2.CloudTasks.RunTask], will run a task even if the queue has reached its [RateLimits][google.cloud.tasks.v2.RateLimits]. - - Attributes: max_dispatches_per_second: The maximum rate at which tasks are dispatched from this @@ -661,11 +653,8 @@ dict( DESCRIPTOR=_RETRYCONFIG, __module__="google.cloud.tasks_v2.proto.queue_pb2", - __doc__="""Retry config. - - These settings determine when a failed task attempt is retried. - - + __doc__="""Retry config. These settings determine when a failed task attempt is + retried. Attributes: max_attempts: Number of attempts per task. Cloud Tasks will attempt the @@ -755,10 +744,8 @@ dict( DESCRIPTOR=_STACKDRIVERLOGGINGCONFIG, __module__="google.cloud.tasks_v2.proto.queue_pb2", - __doc__="""Configuration options for writing logs to `Stackdriver - Logging `_. - - + __doc__="""Configuration options for writing logs to `Stackdriver Logging + `_. Attributes: sampling_ratio: Specifies the fraction of operations to write to `Stackdriver diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/target_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/target_pb2.py index 70a4c939fabd..1ae54401c6b1 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/target_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/target_pb2.py @@ -703,39 +703,29 @@ ), DESCRIPTOR=_HTTPREQUEST, __module__="google.cloud.tasks_v2.proto.target_pb2", - __doc__="""HTTP request. - - The task will be pushed to the worker as an HTTP request. If the worker - or the redirected worker acknowledges the task by returning a successful - HTTP response code ([``200`` - ``299``]), the task will be removed from - the queue. If any other HTTP response code is returned or no response is - received, the task will be retried according to the following: - - - User-specified throttling: [retry - configuration][google.cloud.tasks.v2.Queue.retry\_config], [rate - limits][google.cloud.tasks.v2.Queue.rate\_limits], and the [queue's - state][google.cloud.tasks.v2.Queue.state]. - - - System throttling: To prevent the worker from overloading, Cloud - Tasks may temporarily reduce the queue's effective rate. - User-specified settings will not be changed. - - System throttling happens because: - - - Cloud Tasks backs off on all errors. Normally the backoff specified - in [rate limits][google.cloud.tasks.v2.Queue.rate\_limits] will be - used. But if the worker returns ``429`` (Too Many Requests), ``503`` - (Service Unavailable), or the rate of errors is high, Cloud Tasks - will use a higher backoff rate. The retry specified in the - ``Retry-After`` HTTP response header is considered. - - - To prevent traffic spikes and to smooth sudden increases in traffic, - dispatches ramp up slowly when the queue is newly created or idle and - if large numbers of tasks suddenly become available to dispatch (due - to spikes in create task rates, the queue being unpaused, or many - tasks that are scheduled at the same time). - - + __doc__="""HTTP request. The task will be pushed to the worker as an HTTP + request. If the worker or the redirected worker acknowledges the task + by returning a successful HTTP response code ([``200`` - ``299``]), + the task will be removed from the queue. If any other HTTP response + code is returned or no response is received, the task will be retried + according to the following: - User-specified throttling: [retry + configuration][google.cloud.tasks.v2.Queue.retry\_config], [rate + limits][google.cloud.tasks.v2.Queue.rate\_limits], and the [queue's + state][google.cloud.tasks.v2.Queue.state]. - System throttling: To + prevent the worker from overloading, Cloud Tasks may temporarily + reduce the queue's effective rate. User-specified settings will not + be changed. System throttling happens because: - Cloud Tasks backs + off on all errors. Normally the backoff specified in [rate + limits][google.cloud.tasks.v2.Queue.rate\_limits] will be used. But + if the worker returns ``429`` (Too Many Requests), ``503`` (Service + Unavailable), or the rate of errors is high, Cloud Tasks will use a + higher backoff rate. The retry specified in the ``Retry-After`` + HTTP response header is considered. - To prevent traffic spikes and + to smooth sudden increases in traffic, dispatches ramp up slowly + when the queue is newly created or idle and if large numbers of + tasks suddenly become available to dispatch (due to spikes in + create task rates, the queue being unpaused, or many tasks that are + scheduled at the same time). Attributes: url: Required. The full url path that the request will be sent to. @@ -817,58 +807,45 @@ ), DESCRIPTOR=_APPENGINEHTTPREQUEST, __module__="google.cloud.tasks_v2.proto.target_pb2", - __doc__="""App Engine HTTP request. - - The message defines the HTTP request that is sent to an App Engine app - when the task is dispatched. - - Using [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] - requires - ```appengine.applications.get`` `_ + __doc__="""App Engine HTTP request. The message defines the HTTP request that is + sent to an App Engine app when the task is dispatched. Using + [AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest] + requires ```appengine.applications.get`` + `_ Google IAM permission for the project and the following scope: - - ``https://www.googleapis.com/auth/cloud-platform`` - - The task will be delivered to the App Engine app which belongs to the - same project as the queue. For more information, see `How Requests are - Routed `_ - and how routing is affected by `dispatch - files `_. + ``https://www.googleapis.com/auth/cloud-platform`` The task will be + delivered to the App Engine app which belongs to the same project as + the queue. For more information, see `How Requests are Routed + `_ and how routing is affected by `dispatch files `_. Traffic is encrypted during transport and never leaves Google datacenters. Because this traffic is carried over a communication mechanism internal to Google, you cannot explicitly set the protocol - (for example, HTTP or HTTPS). The request to the handler, however, will - appear to have used the HTTP protocol. - - The [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to + (for example, HTTP or HTTPS). The request to the handler, however, + will appear to have used the HTTP protocol. The + [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] used to construct the URL that the task is delivered to can be set at the - queue-level or task-level: - - - If [app\_engine\_routing\_override is set on the - queue][Queue.app\_engine\_routing\_override], this value is used for - all tasks in the queue, no matter what the setting is for the - [task-level - app\_engine\_routing][AppEngineHttpRequest.app\_engine\_routing]. - - The ``url`` that the task will be sent to is: - - - ``url =`` [host][google.cloud.tasks.v2.AppEngineRouting.host] ``+`` - [relative\_uri][google.cloud.tasks.v2.AppEngineHttpRequest.relative\_uri] - + queue-level or task-level: - If [app\_engine\_routing\_override is + set on the queue][Queue.app\_engine\_routing\_override], this value + is used for all tasks in the queue, no matter what the setting is + for the [task-level + app\_engine\_routing][AppEngineHttpRequest.app\_engine\_routing]. The + ``url`` that the task will be sent to is: - ``url =`` + [host][google.cloud.tasks.v2.AppEngineRouting.host] ``+`` [relative + \_uri][google.cloud.tasks.v2.AppEngineHttpRequest.relative\_uri] Tasks can be dispatched to secure app handlers, unsecure app handlers, - and URIs restricted with - ```login: admin`` `_. - Because tasks are not run as any user, they cannot be dispatched to URIs - restricted with - ```login: required`` `_ - Task dispatches also do not follow redirects. - - The task attempt has succeeded if the app's request handler returns an - HTTP response code in the range [``200`` - ``299``]. The task attempt - has failed if the app's handler returns a non-2xx response code or Cloud - Tasks does not receive response before the - [deadline][google.cloud.tasks.v2.Task.dispatch\_deadline]. Failed tasks - will be retried according to the [retry + and URIs restricted with ```login: admin`` `_. Because tasks are not + run as any user, they cannot be dispatched to URIs restricted with + ```login: required`` `_ Task dispatches also do not follow + redirects. The task attempt has succeeded if the app's request + handler returns an HTTP response code in the range [``200`` - + ``299``]. The task attempt has failed if the app's handler returns a + non-2xx response code or Cloud Tasks does not receive response before + the [deadline][google.cloud.tasks.v2.Task.dispatch\_deadline]. Failed + tasks will be retried according to the [retry configuration][google.cloud.tasks.v2.Queue.retry\_config]. ``503`` (Service Unavailable) is considered an App Engine system error instead of an application error and will cause Cloud Tasks' traffic congestion @@ -876,8 +853,6 @@ types of task targets, a ``429`` (Too Many Requests) response from an app handler does not cause traffic congestion control to throttle the queue. - - Attributes: http_method: The HTTP method to use for the request. The default is POST. @@ -957,29 +932,22 @@ dict( DESCRIPTOR=_APPENGINEROUTING, __module__="google.cloud.tasks_v2.proto.target_pb2", - __doc__="""App Engine Routing. - - Defines routing characteristics specific to App Engine - service, - version, and instance. - - For more information about services, versions, and instances see `An - Overview of App - Engine `_, - `Microservices Architecture on Google App - Engine `_, - `App Engine Standard request - routing `_, - and `App Engine Flex request - routing `_. - - Using [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] - requires - ```appengine.applications.get`` `_ + __doc__="""App Engine Routing. Defines routing characteristics specific to App + Engine - service, version, and instance. For more information about + services, versions, and instances see `An Overview of App Engine + `_, `Microservices Architecture on Google App Engine + `_, `App Engine Standard request routing + `_, and `App Engine Flex request routing + `_. Using + [AppEngineRouting][google.cloud.tasks.v2.AppEngineRouting] requires + ```appengine.applications.get`` + `_ Google IAM permission for the project and the following scope: - ``https://www.googleapis.com/auth/cloud-platform`` - - Attributes: service: App service. By default, the task is sent to the service @@ -1056,12 +1024,10 @@ dict( DESCRIPTOR=_OAUTHTOKEN, __module__="google.cloud.tasks_v2.proto.target_pb2", - __doc__="""Contains information needed for generating an `OAuth - token `_. This - type of authorization should generally only be used when calling Google - APIs hosted on \*.googleapis.com. - - + __doc__="""Contains information needed for generating an `OAuth token + `_. This + type of authorization should generally only be used when calling + Google APIs hosted on \*.googleapis.com. Attributes: service_account_email: \ `Service account email @@ -1085,14 +1051,11 @@ dict( DESCRIPTOR=_OIDCTOKEN, __module__="google.cloud.tasks_v2.proto.target_pb2", - __doc__="""Contains information needed for generating an `OpenID - Connect - token `_. + __doc__="""Contains information needed for generating an `OpenID Connect token + `_. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. - - Attributes: service_account_email: \ `Service account email diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/task_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/task_pb2.py index b8d6ffb30ff3..6235f3da06f9 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/task_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2/proto/task_pb2.py @@ -449,8 +449,6 @@ DESCRIPTOR=_TASK, __module__="google.cloud.tasks_v2.proto.task_pb2", __doc__="""A unit of scheduled work. - - Attributes: name: Optionally caller-specified in @@ -552,8 +550,6 @@ DESCRIPTOR=_ATTEMPT, __module__="google.cloud.tasks_v2.proto.task_pb2", __doc__="""The status of a task attempt. - - Attributes: schedule_time: Output only. The time that this attempt was scheduled. diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/cloudtasks_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/cloudtasks_pb2.py index a7e7c1a4e5b3..89af8545939e 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/cloudtasks_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/cloudtasks_pb2.py @@ -1390,8 +1390,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. - - Attributes: parent: Required. The location name. For example: @@ -1437,8 +1435,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. - - Attributes: queues: The list of queues. @@ -1464,8 +1460,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. - - Attributes: name: Required. The resource name of the queue. For example: @@ -1484,8 +1478,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. - - Attributes: parent: Required. The location name in which the queue will be @@ -1512,8 +1504,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. - - Attributes: queue: Required. The queue to create or update. The queue's @@ -1540,8 +1530,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1560,8 +1548,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1580,8 +1566,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1600,8 +1584,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1620,8 +1602,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. - - Attributes: parent: Required. The queue name. For example: @@ -1668,8 +1648,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. - - Attributes: tasks: The list of tasks. @@ -1694,8 +1672,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1727,8 +1703,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. - - Attributes: parent: Required. The queue name. For example: @@ -1791,8 +1765,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for deleting a task using [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1811,8 +1783,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. - - Attributes: parent: Required. The queue name. For example: @@ -1896,8 +1866,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. - - Attributes: tasks: The leased tasks. @@ -1913,10 +1881,8 @@ dict( DESCRIPTOR=_ACKNOWLEDGETASKREQUEST, __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", - __doc__="""Request message for acknowledging a task using - [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]. - - + __doc__="""Request message for acknowledging a task using [AcknowledgeTask][googl + e.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]. Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1944,8 +1910,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for renewing a lease using [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1990,8 +1954,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for canceling a lease using [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -2032,8 +1994,6 @@ __module__="google.cloud.tasks_v2beta2.proto.cloudtasks_pb2", __doc__="""Request message for forcing a task to run now using [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/queue_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/queue_pb2.py index 5fd3fd185df3..cca7588ec75d 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/queue_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/queue_pb2.py @@ -502,11 +502,9 @@ dict( DESCRIPTOR=_QUEUE, __module__="google.cloud.tasks_v2beta2.proto.queue_pb2", - __doc__="""A queue is a container of related tasks. Queues are configured to manage - how those tasks are dispatched. Configurable properties include rate - limits, retry options, target types, and others. - - + __doc__="""A queue is a container of related tasks. Queues are configured to + manage how those tasks are dispatched. Configurable properties include + rate limits, retry options, target types, and others. Attributes: name: Caller-specified and required in [CreateQueue][google.cloud.ta @@ -597,18 +595,12 @@ dict( DESCRIPTOR=_RATELIMITS, __module__="google.cloud.tasks_v2beta2.proto.queue_pb2", - __doc__="""Rate limits. - - This message determines the maximum rate that tasks can be dispatched by - a queue, regardless of whether the dispatch is a first task attempt or a - retry. - - Note: The debugging command, + __doc__="""Rate limits. This message determines the maximum rate that tasks can + be dispatched by a queue, regardless of whether the dispatch is a + first task attempt or a retry. Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. - - Attributes: max_tasks_dispatched_per_second: The maximum rate at which tasks are dispatched from this @@ -679,11 +671,8 @@ dict( DESCRIPTOR=_RETRYCONFIG, __module__="google.cloud.tasks_v2beta2.proto.queue_pb2", - __doc__="""Retry config. - - These settings determine how a failed task attempt is retried. - - + __doc__="""Retry config. These settings determine how a failed task attempt is + retried. Attributes: num_attempts: Number of attempts per task. If unspecified when the queue is diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/target_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/target_pb2.py index e48601321396..83561f4ff755 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/target_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/target_pb2.py @@ -477,9 +477,7 @@ dict( DESCRIPTOR=_PULLTARGET, __module__="google.cloud.tasks_v2beta2.proto.target_pb2", - __doc__="""Pull target. - - """, + __doc__="""Pull target.""", # @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.PullTarget) ), ) @@ -491,14 +489,11 @@ dict( DESCRIPTOR=_PULLMESSAGE, __module__="google.cloud.tasks_v2beta2.proto.target_pb2", - __doc__="""The pull message contains data that can be used by the - caller of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] - to process the task. - - This proto can only be used for tasks in a queue which has + __doc__="""The pull message contains data that can be used by the caller of + [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to + process the task. This proto can only be used for tasks in a queue + which has [pull\_target][google.cloud.tasks.v2beta2.Queue.pull\_target] set. - - Attributes: payload: A data payload consumed by the worker to execute the task. @@ -531,26 +526,18 @@ dict( DESCRIPTOR=_APPENGINEHTTPTARGET, __module__="google.cloud.tasks_v2beta2.proto.target_pb2", - __doc__="""App Engine HTTP target. - - The task will be delivered to the App Engine application hostname - specified by its + __doc__="""App Engine HTTP target. The task will be delivered to the App Engine + application hostname specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] - and - [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. - The documentation for - [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - explains how the task's host URL is constructed. - - Using + and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpReq + uest]. The documentation for [AppEngineHttpRequest][google.cloud.tasks + .v2beta2.AppEngineHttpRequest] explains how the task's host URL is + constructed. Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] - requires - ```appengine.applications.get`` `_ + requires ```appengine.applications.get`` + `_ Google IAM permission for the project and the following scope: - ``https://www.googleapis.com/auth/cloud-platform`` - - Attributes: app_engine_routing_override: Overrides for the [task-level app\_engine\_routing][google.clo @@ -580,73 +567,54 @@ ), DESCRIPTOR=_APPENGINEHTTPREQUEST, __module__="google.cloud.tasks_v2beta2.proto.target_pb2", - __doc__="""App Engine HTTP request. - - The message defines the HTTP request that is sent to an App Engine app - when the task is dispatched. - - This proto can only be used for tasks in a queue which has - [app\_engine\_http\_target][google.cloud.tasks.v2beta2.Queue.app\_engine\_http\_target] - set. - - Using - [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] - requires - ```appengine.applications.get`` `_ + __doc__="""App Engine HTTP request. The message defines the HTTP request that is + sent to an App Engine app when the task is dispatched. This proto can + only be used for tasks in a queue which has [app\_engine\_http\_target + ][google.cloud.tasks.v2beta2.Queue.app\_engine\_http\_target] set. + Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpR + equest] requires ```appengine.applications.get`` + `_ Google IAM permission for the project and the following scope: - - ``https://www.googleapis.com/auth/cloud-platform`` - - The task will be delivered to the App Engine app which belongs to the - same project as the queue. For more information, see `How Requests are - Routed `_ - and how routing is affected by `dispatch - files `_. + ``https://www.googleapis.com/auth/cloud-platform`` The task will be + delivered to the App Engine app which belongs to the same project as + the queue. For more information, see `How Requests are Routed + `_ and how routing is affected by `dispatch files `_. Traffic is encrypted during transport and never leaves Google datacenters. Because this traffic is carried over a communication mechanism internal to Google, you cannot explicitly set the protocol - (for example, HTTP or HTTPS). The request to the handler, however, will - appear to have used the HTTP protocol. - - The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used + (for example, HTTP or HTTPS). The request to the handler, however, + will appear to have used the HTTP protocol. The + [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is delivered to can be set at the - queue-level or task-level: - - - If set, - [app\_engine\_routing\_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app\_engine\_routing\_override] - is used for all tasks in the queue, no matter what the setting is for - the [task-level - app\_engine\_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app\_engine\_routing]. - - The ``url`` that the task will be sent to is: - - - ``url =`` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] - ``+`` - [relative\_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative\_url] - - Tasks can be dispatched to secure app handlers, unsecure app handlers, - and URIs restricted with - ```login: admin`` `_. - Because tasks are not run as any user, they cannot be dispatched to URIs - restricted with - ```login: required`` `_ - Task dispatches also do not follow redirects. - - The task attempt has succeeded if the app's request handler returns an - HTTP response code in the range [``200`` - ``299``]. The task attempt - has failed if the app's handler returns a non-2xx response code or Cloud - Tasks does not receive response before the - [deadline][Task.dispatch\_deadline]. Failed tasks will be retried + queue-level or task-level: - If set, [app\_engine\_routing\_overr + ide][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app\_engine\_routi + ng\_override] is used for all tasks in the queue, no matter what + the setting is for the [task-level app\_engine\_routing][google. + cloud.tasks.v2beta2.AppEngineHttpRequest.app\_engine\_routing]. The + ``url`` that the task will be sent to is: - ``url =`` + [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] ``+`` [ + relative\_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relativ + e\_url] Tasks can be dispatched to secure app handlers, unsecure app + handlers, and URIs restricted with ```login: admin`` `_. Because + tasks are not run as any user, they cannot be dispatched to URIs + restricted with ```login: required`` `_ Task dispatches also do not + follow redirects. The task attempt has succeeded if the app's request + handler returns an HTTP response code in the range [``200`` - + ``299``]. The task attempt has failed if the app's handler returns a + non-2xx response code or Cloud Tasks does not receive response before + the [deadline][Task.dispatch\_deadline]. Failed tasks will be retried according to the [retry - configuration][google.cloud.tasks.v2beta2.Queue.retry\_config]. ``503`` - (Service Unavailable) is considered an App Engine system error instead - of an application error and will cause Cloud Tasks' traffic congestion - control to temporarily throttle the queue's dispatches. Unlike other - types of task targets, a ``429`` (Too Many Requests) response from an - app handler does not cause traffic congestion control to throttle the - queue. - - + configuration][google.cloud.tasks.v2beta2.Queue.retry\_config]. + ``503`` (Service Unavailable) is considered an App Engine system error + instead of an application error and will cause Cloud Tasks' traffic + congestion control to temporarily throttle the queue's dispatches. + Unlike other types of task targets, a ``429`` (Too Many Requests) + response from an app handler does not cause traffic congestion control + to throttle the queue. Attributes: http_method: The HTTP method to use for the request. The default is POST. @@ -728,22 +696,17 @@ dict( DESCRIPTOR=_APPENGINEROUTING, __module__="google.cloud.tasks_v2beta2.proto.target_pb2", - __doc__="""App Engine Routing. - - Defines routing characteristics specific to App Engine - service, - version, and instance. - - For more information about services, versions, and instances see `An - Overview of App - Engine `_, - `Microservices Architecture on Google App - Engine `_, - `App Engine Standard request - routing `_, - and `App Engine Flex request - routing `_. - - + __doc__="""App Engine Routing. Defines routing characteristics specific to App + Engine - service, version, and instance. For more information about + services, versions, and instances see `An Overview of App Engine + `_, `Microservices Architecture on Google App Engine + `_, `App Engine Standard request routing + `_, and `App Engine Flex request routing + `_. Attributes: service: App service. By default, the task is sent to the service diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/task_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/task_pb2.py index 903dd9b190e7..57466dbc99d6 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/task_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta2/proto/task_pb2.py @@ -469,8 +469,6 @@ DESCRIPTOR=_TASK, __module__="google.cloud.tasks_v2beta2.proto.task_pb2", __doc__="""A unit of scheduled work. - - Attributes: name: Optionally caller-specified in [CreateTask][google.cloud.tasks @@ -539,8 +537,6 @@ DESCRIPTOR=_TASKSTATUS, __module__="google.cloud.tasks_v2beta2.proto.task_pb2", __doc__="""Status of the task. - - Attributes: attempt_dispatch_count: Output only. The number of attempts dispatched. This count @@ -575,8 +571,6 @@ DESCRIPTOR=_ATTEMPTSTATUS, __module__="google.cloud.tasks_v2beta2.proto.task_pb2", __doc__="""The status of a task attempt. - - Attributes: schedule_time: Output only. The time that this attempt was scheduled. diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/cloudtasks_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/cloudtasks_pb2.py index e93cca5e031c..7f0ec4d99767 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/cloudtasks_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/cloudtasks_pb2.py @@ -971,8 +971,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. - - Attributes: parent: Required. The location name. For example: @@ -1017,8 +1015,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Response message for [ListQueues][google.cloud.tasks.v2beta3.CloudTasks.ListQueues]. - - Attributes: queues: The list of queues. @@ -1044,8 +1040,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [GetQueue][google.cloud.tasks.v2beta3.CloudTasks.GetQueue]. - - Attributes: name: Required. The resource name of the queue. For example: @@ -1064,8 +1058,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue]. - - Attributes: parent: Required. The location name in which the queue will be @@ -1092,8 +1084,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue]. - - Attributes: queue: Required. The queue to create or update. The queue's @@ -1120,8 +1110,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1140,8 +1128,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1160,8 +1146,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1180,8 +1164,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue]. - - Attributes: name: Required. The queue name. For example: @@ -1200,8 +1182,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. - - Attributes: parent: Required. The queue name. For example: @@ -1248,8 +1228,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta3.CloudTasks.ListTasks]. - - Attributes: tasks: The list of tasks. @@ -1274,8 +1252,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for getting a task using [GetTask][google.cloud.tasks.v2beta3.CloudTasks.GetTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1307,8 +1283,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask]. - - Attributes: parent: Required. The queue name. For example: @@ -1371,8 +1345,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for deleting a task using [DeleteTask][google.cloud.tasks.v2beta3.CloudTasks.DeleteTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo @@ -1391,8 +1363,6 @@ __module__="google.cloud.tasks_v2beta3.proto.cloudtasks_pb2", __doc__="""Request message for forcing a task to run now using [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask]. - - Attributes: name: Required. The task name. For example: ``projects/PROJECT_ID/lo diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/queue_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/queue_pb2.py index cc0dbc363424..dbfd8d3863d3 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/queue_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/queue_pb2.py @@ -498,11 +498,9 @@ dict( DESCRIPTOR=_QUEUE, __module__="google.cloud.tasks_v2beta3.proto.queue_pb2", - __doc__="""A queue is a container of related tasks. Queues are - configured to manage how those tasks are dispatched. Configurable - properties include rate limits, retry options, queue types, and others. - - + __doc__="""A queue is a container of related tasks. Queues are configured to + manage how those tasks are dispatched. Configurable properties include + rate limits, retry options, queue types, and others. Attributes: name: Caller-specified and required in [CreateQueue][google.cloud.ta @@ -599,18 +597,12 @@ dict( DESCRIPTOR=_RATELIMITS, __module__="google.cloud.tasks_v2beta3.proto.queue_pb2", - __doc__="""Rate limits. - - This message determines the maximum rate that tasks can be dispatched by - a queue, regardless of whether the dispatch is a first task attempt or a - retry. - - Note: The debugging command, + __doc__="""Rate limits. This message determines the maximum rate that tasks can + be dispatched by a queue, regardless of whether the dispatch is a + first task attempt or a retry. Note: The debugging command, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits]. - - Attributes: max_dispatches_per_second: The maximum rate at which tasks are dispatched from this @@ -672,11 +664,8 @@ dict( DESCRIPTOR=_RETRYCONFIG, __module__="google.cloud.tasks_v2beta3.proto.queue_pb2", - __doc__="""Retry config. - - These settings determine when a failed task attempt is retried. - - + __doc__="""Retry config. These settings determine when a failed task attempt is + retried. Attributes: max_attempts: Number of attempts per task. Cloud Tasks will attempt the @@ -763,10 +752,8 @@ dict( DESCRIPTOR=_STACKDRIVERLOGGINGCONFIG, __module__="google.cloud.tasks_v2beta3.proto.queue_pb2", - __doc__="""Configuration options for writing logs to `Stackdriver - Logging `_. - - + __doc__="""Configuration options for writing logs to `Stackdriver Logging + `_. Attributes: sampling_ratio: Specifies the fraction of operations to write to `Stackdriver diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py index bfe74fc0633a..27530a15d008 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/target_pb2.py @@ -742,39 +742,29 @@ ), DESCRIPTOR=_HTTPREQUEST, __module__="google.cloud.tasks_v2beta3.proto.target_pb2", - __doc__="""HTTP request. - - The task will be pushed to the worker as an HTTP request. If the worker - or the redirected worker acknowledges the task by returning a successful - HTTP response code ([``200`` - ``299``]), the task will be removed from - the queue. If any other HTTP response code is returned or no response is - received, the task will be retried according to the following: - - - User-specified throttling: [retry - configuration][google.cloud.tasks.v2beta3.Queue.retry\_config], [rate - limits][google.cloud.tasks.v2beta3.Queue.rate\_limits], and the - [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - - - System throttling: To prevent the worker from overloading, Cloud - Tasks may temporarily reduce the queue's effective rate. - User-specified settings will not be changed. - - System throttling happens because: - - - Cloud Tasks backs off on all errors. Normally the backoff specified - in [rate limits][google.cloud.tasks.v2beta3.Queue.rate\_limits] will - be used. But if the worker returns ``429`` (Too Many Requests), - ``503`` (Service Unavailable), or the rate of errors is high, Cloud - Tasks will use a higher backoff rate. The retry specified in the - ``Retry-After`` HTTP response header is considered. - - - To prevent traffic spikes and to smooth sudden increases in traffic, - dispatches ramp up slowly when the queue is newly created or idle and - if large numbers of tasks suddenly become available to dispatch (due - to spikes in create task rates, the queue being unpaused, or many - tasks that are scheduled at the same time). - - + __doc__="""HTTP request. The task will be pushed to the worker as an HTTP + request. If the worker or the redirected worker acknowledges the task + by returning a successful HTTP response code ([``200`` - ``299``]), + the task will be removed from the queue. If any other HTTP response + code is returned or no response is received, the task will be retried + according to the following: - User-specified throttling: [retry + configuration][google.cloud.tasks.v2beta3.Queue.retry\_config], [rate + limits][google.cloud.tasks.v2beta3.Queue.rate\_limits], and the + [queue's state][google.cloud.tasks.v2beta3.Queue.state]. - System + throttling: To prevent the worker from overloading, Cloud Tasks may + temporarily reduce the queue's effective rate. User-specified + settings will not be changed. System throttling happens because: - + Cloud Tasks backs off on all errors. Normally the backoff specified + in [rate limits][google.cloud.tasks.v2beta3.Queue.rate\_limits] will + be used. But if the worker returns ``429`` (Too Many Requests), + ``503`` (Service Unavailable), or the rate of errors is high, Cloud + Tasks will use a higher backoff rate. The retry specified in the + ``Retry-After`` HTTP response header is considered. - To prevent + traffic spikes and to smooth sudden increases in traffic, + dispatches ramp up slowly when the queue is newly created or idle and + if large numbers of tasks suddenly become available to dispatch (due + to spikes in create task rates, the queue being unpaused, or many + tasks that are scheduled at the same time). Attributes: url: Required. The full url path that the request will be sent to. @@ -848,25 +838,18 @@ dict( DESCRIPTOR=_APPENGINEHTTPQUEUE, __module__="google.cloud.tasks_v2beta3.proto.target_pb2", - __doc__="""App Engine HTTP queue. - - The task will be delivered to the App Engine application hostname - specified by its - [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and - [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest]. - The documentation for - [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] - explains how the task's host URL is constructed. - - Using + __doc__="""App Engine HTTP queue. The task will be delivered to the App Engine + application hostname specified by its [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] - requires - ```appengine.applications.get`` `_ + and [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpReq + uest]. The documentation for [AppEngineHttpRequest][google.cloud.tasks + .v2beta3.AppEngineHttpRequest] explains how the task's host URL is + constructed. Using + [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] + requires ```appengine.applications.get`` + `_ Google IAM permission for the project and the following scope: - ``https://www.googleapis.com/auth/cloud-platform`` - - Attributes: app_engine_routing_override: Overrides for the [task-level app\_engine\_routing][google.clo @@ -896,69 +879,52 @@ ), DESCRIPTOR=_APPENGINEHTTPREQUEST, __module__="google.cloud.tasks_v2beta3.proto.target_pb2", - __doc__="""App Engine HTTP request. - - The message defines the HTTP request that is sent to an App Engine app - when the task is dispatched. - - Using - [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] - requires - ```appengine.applications.get`` `_ + __doc__="""App Engine HTTP request. The message defines the HTTP request that is + sent to an App Engine app when the task is dispatched. Using [AppEngi + neHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] + requires ```appengine.applications.get`` + `_ Google IAM permission for the project and the following scope: - - ``https://www.googleapis.com/auth/cloud-platform`` - - The task will be delivered to the App Engine app which belongs to the - same project as the queue. For more information, see `How Requests are - Routed `_ - and how routing is affected by `dispatch - files `_. + ``https://www.googleapis.com/auth/cloud-platform`` The task will be + delivered to the App Engine app which belongs to the same project as + the queue. For more information, see `How Requests are Routed + `_ and how routing is affected by `dispatch files `_. Traffic is encrypted during transport and never leaves Google datacenters. Because this traffic is carried over a communication mechanism internal to Google, you cannot explicitly set the protocol - (for example, HTTP or HTTPS). The request to the handler, however, will - appear to have used the HTTP protocol. - - The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used + (for example, HTTP or HTTPS). The request to the handler, however, + will appear to have used the HTTP protocol. The + [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to construct the URL that the task is delivered to can be set at the - queue-level or task-level: - - - If set, - [app\_engine\_routing\_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app\_engine\_routing\_override] - is used for all tasks in the queue, no matter what the setting is for - the [task-level - app\_engine\_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app\_engine\_routing]. - - The ``url`` that the task will be sent to is: - - - ``url =`` [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] - ``+`` - [relative\_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relative\_uri] - - Tasks can be dispatched to secure app handlers, unsecure app handlers, - and URIs restricted with - ```login: admin`` `_. - Because tasks are not run as any user, they cannot be dispatched to URIs - restricted with - ```login: required`` `_ - Task dispatches also do not follow redirects. - - The task attempt has succeeded if the app's request handler returns an - HTTP response code in the range [``200`` - ``299``]. The task attempt - has failed if the app's handler returns a non-2xx response code or Cloud - Tasks does not receive response before the - [deadline][google.cloud.tasks.v2beta3.Task.dispatch\_deadline]. Failed - tasks will be retried according to the [retry - configuration][google.cloud.tasks.v2beta3.Queue.retry\_config]. ``503`` - (Service Unavailable) is considered an App Engine system error instead - of an application error and will cause Cloud Tasks' traffic congestion - control to temporarily throttle the queue's dispatches. Unlike other - types of task targets, a ``429`` (Too Many Requests) response from an - app handler does not cause traffic congestion control to throttle the - queue. - - + queue-level or task-level: - If set, [app\_engine\_routing\_overr + ide][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app\_engine\_routin + g\_override] is used for all tasks in the queue, no matter what the + setting is for the [task-level app\_engine\_routing][google.clou + d.tasks.v2beta3.AppEngineHttpRequest.app\_engine\_routing]. The + ``url`` that the task will be sent to is: - ``url =`` + [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] ``+`` [ + relative\_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relativ + e\_uri] Tasks can be dispatched to secure app handlers, unsecure app + handlers, and URIs restricted with ```login: admin`` `_. Because + tasks are not run as any user, they cannot be dispatched to URIs + restricted with ```login: required`` `_ Task dispatches also do not + follow redirects. The task attempt has succeeded if the app's request + handler returns an HTTP response code in the range [``200`` - + ``299``]. The task attempt has failed if the app's handler returns a + non-2xx response code or Cloud Tasks does not receive response before + the [deadline][google.cloud.tasks.v2beta3.Task.dispatch\_deadline]. + Failed tasks will be retried according to the [retry + configuration][google.cloud.tasks.v2beta3.Queue.retry\_config]. + ``503`` (Service Unavailable) is considered an App Engine system error + instead of an application error and will cause Cloud Tasks' traffic + congestion control to temporarily throttle the queue's dispatches. + Unlike other types of task targets, a ``429`` (Too Many Requests) + response from an app handler does not cause traffic congestion control + to throttle the queue. Attributes: http_method: The HTTP method to use for the request. The default is POST. @@ -1039,22 +1005,17 @@ dict( DESCRIPTOR=_APPENGINEROUTING, __module__="google.cloud.tasks_v2beta3.proto.target_pb2", - __doc__="""App Engine Routing. - - Defines routing characteristics specific to App Engine - service, - version, and instance. - - For more information about services, versions, and instances see `An - Overview of App - Engine `_, - `Microservices Architecture on Google App - Engine `_, - `App Engine Standard request - routing `_, - and `App Engine Flex request - routing `_. - - + __doc__="""App Engine Routing. Defines routing characteristics specific to App + Engine - service, version, and instance. For more information about + services, versions, and instances see `An Overview of App Engine + `_, `Microservices Architecture on Google App Engine + `_, `App Engine Standard request routing + `_, and `App Engine Flex request routing + `_. Attributes: service: App service. By default, the task is sent to the service @@ -1127,12 +1088,10 @@ dict( DESCRIPTOR=_OAUTHTOKEN, __module__="google.cloud.tasks_v2beta3.proto.target_pb2", - __doc__="""Contains information needed for generating an `OAuth - token `_. This - type of authorization should generally only be used when calling Google - APIs hosted on \*.googleapis.com. - - + __doc__="""Contains information needed for generating an `OAuth token + `_. This + type of authorization should generally only be used when calling + Google APIs hosted on \*.googleapis.com. Attributes: service_account_email: \ `Service account email @@ -1156,14 +1115,11 @@ dict( DESCRIPTOR=_OIDCTOKEN, __module__="google.cloud.tasks_v2beta3.proto.target_pb2", - __doc__="""Contains information needed for generating an `OpenID - Connect - token `_. + __doc__="""Contains information needed for generating an `OpenID Connect token + `_. This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself. - - Attributes: service_account_email: \ `Service account email diff --git a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/task_pb2.py b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/task_pb2.py index 7898b8fcf889..96a27bfbb5e4 100644 --- a/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/task_pb2.py +++ b/packages/google-cloud-tasks/google/cloud/tasks_v2beta3/proto/task_pb2.py @@ -451,8 +451,6 @@ DESCRIPTOR=_TASK, __module__="google.cloud.tasks_v2beta3.proto.task_pb2", __doc__="""A unit of scheduled work. - - Attributes: name: Optionally caller-specified in [CreateTask][google.cloud.tasks @@ -555,8 +553,6 @@ DESCRIPTOR=_ATTEMPT, __module__="google.cloud.tasks_v2beta3.proto.task_pb2", __doc__="""The status of a task attempt. - - Attributes: schedule_time: Output only. The time that this attempt was scheduled. diff --git a/packages/google-cloud-tasks/noxfile.py b/packages/google-cloud-tasks/noxfile.py index fa1318429a09..091af628e25f 100644 --- a/packages/google-cloud-tasks/noxfile.py +++ b/packages/google-cloud-tasks/noxfile.py @@ -111,7 +111,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install("mock", "pytest") - + session.install("git+https://github.com/googleapis/python-test-utils") session.install("-e", ".") # Run py.test against the system tests. @@ -139,7 +139,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark") + session.install("sphinx<3.0.0", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/packages/google-cloud-tasks/setup.cfg b/packages/google-cloud-tasks/setup.cfg index 3bd555500e37..c3a2b39f6528 100644 --- a/packages/google-cloud-tasks/setup.cfg +++ b/packages/google-cloud-tasks/setup.cfg @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/packages/google-cloud-tasks/synth.metadata b/packages/google-cloud-tasks/synth.metadata index 8de36b327c41..b1545284df2c 100644 --- a/packages/google-cloud-tasks/synth.metadata +++ b/packages/google-cloud-tasks/synth.metadata @@ -1,27 +1,32 @@ { - "updateTime": "2020-03-04T13:28:22.683391Z", "sources": [ { "generator": { "name": "artman", - "version": "1.0.0", - "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482" + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" + } + }, + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/python-tasks.git", + "sha": "100e9c709383848498e1e6a747fb819520a7d8c1" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "541b1ded4abadcc38e8178680b0677f65594ea6f", - "internalRef": "298686266", - "log": "541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { - "template": { - "name": "python_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "f5e4c17dc78a966dbf29961dd01f9bbd63e20a04" } } ],