Deleting Tasks and Queues

This page describes how to delete tasks from a push queue and how to delete queues. In some cases you might need to delete a task that cannot be completed successfully, no matter how many times it is retried

Deleting tasks from a queue

API

Use delete_tasks() to delete an individual task:

from google.appengine.api import taskqueue

# Delete an individual task...
q = taskqueue.Queue('queue1')
q.delete_tasks(taskqueue.Task(name='foo'))

Console

To delete a task from the Cloud Platform Console:

  1. Open the Task queues page in the console"

    Go to the Task queues page

  2. Click the name of the queue from which you want to remove the task.

  3. Select the task that you want to delete and click Delete selected tasks.

    The Delete
  selected tasks button is the last in the list of actions at the top
  right of the page.

  4. Click Delete.

Purging all tasks from a queue

API

Use purge() to delete all tasks from the specified queue:

from google.appengine.api import taskqueue

# Purge entire queue...
q = taskqueue.Queue('queue1')
q.purge()

Console

To delete a task from the Cloud Platform Console:

  1. Open the Task queues page in the console"

    Go to the Task queues page

  2. Click the name of the queue from which you want to remove the task.

  3. Select the task that you want to delete and click Delete all tasks.

    The
  Delete all tasks button purges all tasks from the queue.

  4. Click Delete.

Purging a queue is not honored immediately. It takes the system about 20 seconds to notice that the queue has been purged. During that time, if there are still tasks on the queue, more tasks might be dequeued and executed.

It can take several hours to reclaim the quotas freed up by purging a queue.

Disabling queues

You can disable a queue by removing its definition from your queue.yaml file and then uploading upload the queue.yaml file.

If you disable a queue by omitting it from the queue.yaml and uploading it, the queue is set to "disabled" and its rate is set to 0. Any tasks that remain on the queue or new tasks that are added to the queue will not be processed. You can re-enable the disabled queue by uploading a new queue.yaml file with the queue defined.

You can also pause a queue from within the Task queues page in the Cloud Platform Console

Deleting queues

To delete a queue:

  1. Remove the queue definition from your queue.yaml file.

  2. Upload the change to your queue.yaml file.

    gcloud app deploy queue.yaml
    

  3. Delete the queue in the Cloud Platform Console, select the queue and click Delete queue:

    Go to the Task queues page

If you delete a queue from the Cloud Platform Console, you must wait 7 days before recreating with the same name.

Send feedback about...

App Engine standard environment for Python