def delete_queue(project, queue_name, location):
"""Delete a task queue."""
from google.cloud import tasks_v2
# Create a client.
client = tasks_v2.CloudTasksClient()
# Get the fully qualified path to queue.
queue = client.queue_path(project, location, queue_name)
# Use the client to delete the queue.
client.delete_queue(request={"name": queue})
print("Deleted queue")