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 deleteTask()
) to delete an individual task:
// Delete an individual task...
Queue q = QueueFactory.getQueue("queue1");
q.deleteTask("foo")
Console
To delete a task from the Cloud Console:
Open the Task queues page in the console"
Click the name of the queue from which you want to remove the task.
Select the task that you want to delete and click Delete selected tasks.
Click Delete.
Purging all tasks from a queue
API
Use purge()
) to delete all tasks from the specified queue:
// Purge entire queue...
Queue queue = QueueFactory.getQueue("foo");
queue.purge();
Console
To delete a task from the Cloud Console:
Open the Task queues page in the console"
Click the name of the queue from which you want to remove the task.
Select the task that you want to delete and click Delete all tasks.
Click Delete.
All tasks created before the moment of purging are expunged. Purge operations can take up to one minute to take effect.
It can take several hours to reclaim the quotas freed up by purging a queue.
Pausing queues
You can pause a queue by removing its definition from your
file
and then uploading the edited queue.yaml
file. Setting any queue's rate to
0 will also pause the queue.queue.yaml
Any tasks that remain on a paused queue or any new tasks that are added to it
will not be processed. You can resume the paused queue by uploading a new
file with the queue defined and rate set to a non-zero value.
Paused queues continue to count as a part of your quota.queue.yaml
You can also pause a queue from within the Task queues page in the Cloud Console
Deleting queues
It is a best practice to pause a queue before you delete it:
Remove the queue definition from your
file.queue.yaml
Upload the change to your
file.queue.yaml
gcloud/yaml
gcloud app deploy queue.yaml
appcfg/xml
[PATH_TO_APP_ENGINE_SDK]\bin\appcfg.sh update_queues [YOUR_APP_DIR]
or on Windows:
[PATH_TO_APP_ENGINE_SDK]\bin\appcfg.cmd update_queues [YOUR_APP_DIR]
Once the queue is removed from your
file, use the Cloud Console to delete it.queue.yaml
In the Cloud Console, select the queue.
Click Delete queue.
If you delete a queue from the Cloud Console, you must wait 7 days before recreating with the same name.