Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird beschrieben, wie Sie Aufgaben aus einer Push-Warteschlange und Warteschlangen löschen. Das Löschen einer Aufgabe ist mitunter erforderlich, wenn sie trotz wiederholter Versuche nicht erfolgreich abgeschlossen werden kann.
Aufgaben aus einer Warteschlange löschen
API
Verwenden Sie taskqueue.Delete zum Löschen einer einzelnen Aufgabe:
// Delete an individual task...t:=&taskqueue.Task{Name:"foo"}err=taskqueue.Delete(ctx,t,"queue1")
Console
So löschen Sie eine Aufgabe aus der Google Cloud Console:
Öffnen Sie in der Konsole die Seite "Cloud Tasks".
Klicken Sie auf den Namen der Warteschlange, aus der Sie die Aufgabe entfernen möchten.
Wählen Sie die Aufgabe aus, die Sie löschen möchten, und klicken Sie auf Alle Aufgaben löschen.
Klicken Sie auf Löschen.
Alle vor dem Löschen erstellten Aufgaben werden unwiderruflich entfernt. Löschvorgänge können bis zu einer Minute dauern.
Es kann mehrere Stunden dauern, bis Sie die Kontingente, die durch das Löschen einer Warteschlange freigegeben werden, nutzbar sind.
Warteschlangen anhalten
Sie können eine Warteschlange anhalten. Dazu entfernen Sie die zugehörige Definition aus der Datei und laden dann die aktualisierte Datei hoch. Durch Festlegen einer Rate von 0 für eine Warteschlange wird sie ebenfalls angehalten.
Alle Aufgaben, die in einer angehaltenen Warteschlange verbleiben, oder neue Aufgaben, die der Warteschlange hinzugefügt werden, werden nicht verarbeitet. Sie können eine angehaltene Warteschlange wieder fortsetzen. Dazu laden Sie eine neue Datei mit der definierten Warteschlange hoch und legen eine Rate ungleich null fest.
Angehaltene Warteschlangen werden weiterhin Ihrem Kontingent hinzugerechnet.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThis page details the process of deleting individual tasks from a push queue using the \u003ccode\u003etaskqueue.Delete\u003c/code\u003e API or the Google Cloud console, useful when tasks are persistently failing.\u003c/p\u003e\n"],["\u003cp\u003eYou can purge all tasks from a specific queue using the \u003ccode\u003etaskqueue.Purge\u003c/code\u003e API or the console, ensuring all tasks created before the purge are removed, although it may take up to a minute to fully take effect.\u003c/p\u003e\n"],["\u003cp\u003eQueues can be paused by removing their definitions or setting their rate to 0, preventing task processing while still counting towards your quota, and they can be paused through the Cloud Tasks page as well.\u003c/p\u003e\n"],["\u003cp\u003eBefore deleting a queue, it's recommended to pause it, and once deleted through the console, there's a 7-day waiting period before you can reuse the same name.\u003c/p\u003e\n"],["\u003cp\u003eDeleted tasks and queues may take hours to free up the quotas they previously used.\u003c/p\u003e\n"]]],[],null,["# Deleting Tasks and Queues\n\nThis page describes how to delete tasks from a push queue and how to delete\nqueues. In some cases you might need to delete a task that cannot be completed\nsuccessfully, no matter how many times it is retried.\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| go\n| /services/access). If you are updating to the App Engine Go 1.12+ runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/go-differences) to learn about your migration options for legacy bundled services.\n\nDeleting tasks from a queue\n---------------------------\n\n### API\n\nUse [`taskqueue.Delete`](/appengine/docs/legacy/standard/go111/taskqueue/reference#Delete) to delete an individual task:\n\n\u003cbr /\u003e\n\n // Delete an individual task...\n t := &taskqueue.Task{Name: \"foo\"}\n err = taskqueue.Delete(ctx, t, \"queue1\")\n\n### Console\n\n\nTo delete a task from the Google Cloud console:\n\n1. Open the Cloud Tasks page in the console.\n\n [Go to Cloud Tasks](https://console.cloud.google.com/cloudtasks)\n2. Click the name of the queue from which you want to remove the task.\n\n3. Select the task that you want to delete and click **Delete selected tasks**.\n\n4. Click **Delete**.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPurging all tasks from a queue\n------------------------------\n\n### API\n\nUse [`taskqueue.Purge`](/appengine/docs/legacy/standard/go111/taskqueue/reference#Purge) to delete all tasks from the specified queue:\n\n\u003cbr /\u003e\n\n // Purge entire queue...\n err := taskqueue.Purge(ctx, \"queue1\")\n\n### Console\n\n\nTo delete a task from the Google Cloud console:\n\n1. Open the Cloud Tasks page in the console.\n\n [Go to Cloud Tasks](https://console.cloud.google.com/cloudtasks)\n2. Click the name of the queue from which you want to remove the task.\n\n3. Select the task that you want to delete and click **Delete all tasks**.\n\n4. Click **Delete**.\n\n\u003cbr /\u003e\n\nAll tasks created before the moment of purging are expunged. Purge operations\ncan take up to one minute to take effect.\n\nIt can take several hours to reclaim the quotas freed up by purging a queue.\n| **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.\n\nPausing queues\n--------------\n\nYou can pause a queue by removing its definition from your file\nand then uploading the edited file. Setting any queue's rate to\n0 will also pause the queue.\n\nAny tasks that remain on a paused queue or any new tasks that are added to it\nwill not be processed. You can resume the paused queue by uploading a new\nfile with the queue defined and rate set to a non-zero value.\nPaused queues continue to count as a part of your quota.\n\nYou can also pause a queue from within the\n[Cloud Tasks page in the Google Cloud console](https://console.cloud.google.com/cloudtasks)\n\nDeleting queues\n---------------\n\nIt is a best practice to pause a queue before you delete it:\n\n1. Remove the queue definition from your file.\n\n2. Upload the change to your file.\n\n gcloud app deploy\n\nOnce the queue is removed from your file, use the Google Cloud console to delete it.\n\n1. In the Google Cloud console, select the queue.\n\n [Go to Cloud Tasks](https://console.cloud.google.com/cloudtasks)\n2. Click **Delete queue**.\n\nIf you delete a queue from the Google Cloud console, you must wait 7 days\nbefore recreating with the same name."]]