Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated region tags for docs #1329

Merged
merged 2 commits into from
Jan 24, 2018
Merged
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions tasks/pull_queue_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def create_task(project, queue, location):
# [END cloud_tasks_create_task]


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

Expand All @@ -90,8 +90,6 @@ def lease_task(project, queue, location):

print('Leased task {}'.format(response))
return response['tasks'][0]
# [END cloud_tasks_pull_task]


def acknowledge_task(task):
"""Acknowledge a given task."""
Expand All @@ -106,6 +104,7 @@ def acknowledge_task(task):
name=task['name'], body=body).execute()

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


if __name__ == '__main__':
Expand Down