Skip to content

Commit

Permalink
Updated region tags for pull queue samples (#1329)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellenevans authored and andrewsg committed Jan 24, 2018
1 parent bed1b82 commit c7424bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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,7 +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):
Expand All @@ -106,6 +105,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

0 comments on commit c7424bf

Please sign in to comment.