A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues below:

Deleting Tasks and Queues | App Engine standard environment for Python 2

Deleting Tasks and Queues

Stay organized with collections Save and categorize content based on your preferences.

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.

This API is supported for first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes. If you are updating to the App Engine Python 3 runtime, refer to the migration guide to learn about your migration options for legacy bundled services. 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 Google Cloud console:

  1. Open the Cloud Tasks page in the console.

    Go to Cloud Tasks

  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.

  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 Google Cloud console:

  1. Open the Cloud Tasks page in the console.

    Go to Cloud Tasks

  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.

  4. 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.

Warning: Do not create new tasks immediately after purging a queue. Wait at least a second. Tasks created in close temporal proximity to a purge call will also be purged. Pausing queues

You can pause a queue by removing its definition from your queue.yaml file and then uploading the edited queue.yaml file. Setting any queue's rate to 0 will also pause the queue.

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 queue.yaml file with the queue defined and rate set to a non-zero value. Paused queues continue to count as a part of your quota.

You can also pause a queue from within the Cloud Tasks page in the Google Cloud console

Deleting queues

It is a best practice to pause a queue before you delete it:

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

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

    gcloud app deploy queue.yaml

Once the queue is removed from your queue.yaml file, use the Google Cloud console to delete it.

  1. In the Google Cloud console, select the queue.

    Go to Cloud Tasks

  2. Click Delete queue.

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This guide details the process of deleting individual tasks or all tasks from a push queue using both the API and Google Cloud console."],["You can use the `delete_tasks()` API method to remove specific tasks or the `purge()` method to clear all tasks from a specified queue."],["Queues can be paused by either removing their definition from the `queue.yaml` file or by setting their rate to 0, preventing task processing while still counting towards your quota."],["Deleting a queue involves first pausing it by removing its definition from the `queue.yaml` file, then using the Google Cloud console to complete the deletion."],["After deleting a queue, there is a 7-day waiting period before you can recreate a queue with the same name, and you should also wait at least a second after purging a queue before creating new tasks."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4