Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions tasks/google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,15 +434,15 @@ def create_queue(
>>>
>>> # Initialize `queue`:
>>> queue = {
>>> # The fully qualified path to the queue
>>> 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),
>>> 'app_engine_http_queue': {
>>> 'app_engine_routing_override': {
>>> # The App Engine service that will receive the tasks.
>>> 'service': 'default',
>>> },
>>> },
>>> }
... # The fully qualified path to the queue
... 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),
... 'app_engine_http_queue': {
... 'app_engine_routing_override': {
... # The App Engine service that will receive the tasks.
... 'service': 'default',
... },
... },
... }
>>>
>>> response = client.create_queue(parent, queue)

Expand Down Expand Up @@ -539,8 +539,17 @@ def update_queue(
>>>
>>> client = tasks_v2beta3.CloudTasksClient()
>>>
>>> # TODO: Initialize `queue`:
>>> queue = {}
>>> # Initialize `queue`:
>>> queue = {
... # The fully qualified path to the queue
... 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),
... 'app_engine_http_queue': {
... 'app_engine_routing_override': {
... # The App Engine service that will receive the tasks.
... 'service': 'default',
... },
... },
... }
>>>
>>> response = client.update_queue(queue)

Expand Down
10 changes: 5 additions & 5 deletions tasks/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2018-12-18T13:27:29.496588Z",
"updateTime": "2019-01-05T18:32:56.245650Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.3",
"dockerImage": "googleapis/artman@sha256:bfb92654b4a77368471f70e2808eaf4e60f263b9559f27bb3284097322787bf1"
"version": "0.16.4",
"dockerImage": "googleapis/artman@sha256:8b45fae963557c3299921037ecbb86f0689f41b1b4aea73408ebc50562cb2857"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "c04bc0dc0a9164d924a9ab923fd6845b4ae6a7ab",
"internalRef": "225851467"
"sha": "a111a53c0c6722afcd793b64724ceef7862db5b9",
"internalRef": "227896184"
}
},
{
Expand Down
38 changes: 23 additions & 15 deletions tasks/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@

s.copy(library, excludes=excludes)

# Fix unindentation of bullet list second line
s.replace(
f"google/cloud/tasks_{version}/gapic/cloud_tasks_client.py",
"( \* .*\n )([^\s*])",
"\g<1> \g<2>",
)

s.replace(
f"google/cloud/tasks_{version}/gapic/cloud_tasks_client.py",
"(Google IAM .*?_) ",
Expand All @@ -50,20 +43,35 @@
# Issues with Anonymous ('__') links. Change to named.
s.replace(f"google/cloud/tasks_{version}/proto/*.py", ">`__", ">`_")

# Issue in v2beta2
s.replace(
f"google/cloud/tasks_v2beta2/gapic/cloud_tasks_client.py",
r'(Sample filter \\"app_engine_http_target: )\*\\".',
'\g<1>\\*\\".',
)

# Wrapped link fails due to space in link (v2beta2)
s.replace(
f"google/cloud/tasks_v2beta2/proto/queue_pb2.py",
"google/cloud/tasks_v2beta2/proto/queue_pb2.py",
"(uests in queue.yaml/xml) <\n\s+",
"\g<1>\n <",
)

# Restore updated example from PR #7025.
s.replace(
"google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py",
">>> # TODO: Initialize `queue`:",
">>> # Initialize `queue`:",
)
s.replace(
"google/cloud/tasks_v2beta3/gapic/cloud_tasks_client.py",
"^(\s+)>>> queue = {}\n",
"\g<1>>>> queue = {\n"
"\g<1>... # The fully qualified path to the queue\n"
"\g<1>... 'name': client.queue_path('[PROJECT]', '[LOCATION]', '[NAME]'),\n"
"\g<1>... 'app_engine_http_queue': {\n"
"\g<1>... 'app_engine_routing_override': {\n"
"\g<1>... # The App Engine service that will receive the tasks.\n"
"\g<1>... 'service': 'default',\n"
"\g<1>... },\n"
"\g<1>... },\n"
"\g<1>... }\n"
)


# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
Expand Down