Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c7424bf

Browse filesBrowse files
ellenevansandrewsg
authored andcommitted
Updated region tags for pull queue samples (GoogleCloudPlatform#1329)
1 parent bed1b82 commit c7424bf
Copy full SHA for c7424bf

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎tasks/pull_queue_snippets.py

Copy file name to clipboardExpand all lines: tasks/pull_queue_snippets.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def create_task(project, queue, location):
6666
# [END cloud_tasks_create_task]
6767

6868

69-
# [START cloud_tasks_pull_task]
69+
# [START cloud_tasks_lease_and_acknowledge_task]
7070
def lease_task(project, queue, location):
7171
"""Lease a single task from a given queue for 10 minutes."""
7272

@@ -90,7 +90,6 @@ def lease_task(project, queue, location):
9090

9191
print('Leased task {}'.format(response))
9292
return response['tasks'][0]
93-
# [END cloud_tasks_pull_task]
9493

9594

9695
def acknowledge_task(task):
@@ -106,6 +105,7 @@ def acknowledge_task(task):
106105
name=task['name'], body=body).execute()
107106

108107
print('Acknowledged task {}'.format(task['name']))
108+
# [END cloud_tasks_lease_and_acknowledge_task]
109109

110110

111111
if __name__ == '__main__':

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.