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

Update Region Tags #1532

Merged
merged 1 commit into from
Jun 20, 2018
Merged
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
8 changes: 4 additions & 4 deletions tasks/pull_queue_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


def create_task(project, queue, location):
# [START tasks_create_task]
# [START cloud_tasks_create_task]
"""Create a task for a given queue with an arbitrary payload."""

from google.cloud import tasks_v2beta2
Expand All @@ -50,11 +50,11 @@ def create_task(project, queue, location):

print('Created task: {}'.format(response.name))
return response
# [END tasks_create_task]
# [END cloud_tasks_create_task]


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

from google.cloud import tasks_v2beta2
Expand Down Expand Up @@ -89,7 +89,7 @@ def acknowledge_task(task):
client.acknowledge_task(task.name, task.schedule_time)

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


if __name__ == '__main__':
Expand Down