[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a Google-assigned code based on the selected region when creating an app and is included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003equeue.yaml\u003c/code\u003e file is used to create and configure task queues, including the preconfigured \u003ccode\u003edefault\u003c/code\u003e queue, but should not be mixed with Queue Management methods to avoid unexpected results.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003equeue.yaml\u003c/code\u003e file contains definitions for one or multiple named queues, where each queue definition can specify elements like \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003erate\u003c/code\u003e, \u003ccode\u003ebucket_size\u003c/code\u003e, \u003ccode\u003emax_concurrent_requests\u003c/code\u003e, \u003ccode\u003eretry_parameters\u003c/code\u003e and \u003ccode\u003etarget\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003erate\u003c/code\u003e parameter in \u003ccode\u003equeue.yaml\u003c/code\u003e controls how often tasks are processed, with a maximum value of \u003ccode\u003e500/s\u003c/code\u003e, and can be set to \u003ccode\u003e0/s\u003c/code\u003e to pause the queue, while the \u003ccode\u003eretry_parameters\u003c/code\u003e allows to setup the maximum time and amount of retries.\u003c/p\u003e\n"],["\u003cp\u003eTo delete a queue, remove its definition from \u003ccode\u003equeue.yaml\u003c/code\u003e, upload the changes, and then delete the queue in the Google Cloud console, where you must wait 7 days before reusing the same name.\u003c/p\u003e\n"]]],[],null,["# queue.yaml Reference\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/legacy/standard/python/how-requests-are-routed#region-id). \nOK \nGo Java Node.js PHP Python Ruby\n\nThe `queue.yaml` configuration file is used to create and configure almost all\nof the task queues\n\n\nyour app uses. All App Engine apps come with\nan automatically preconfigured push queue named `default`. Although you do not\ncreate the `default` queue yourself, you can add other queues or change the\nconfiguration of the `default` queue using the `queue.yaml` file.\n\nTo configure\n\nyou can use either `queue.yaml` or\n[Queue Management](/tasks/docs/queue-yaml) methods from Cloud Tasks, but\n[not both](/tasks/docs/queue-yaml#pitfalls) at the same time. Mixing the\n`queue.yaml` upload method with Queue Management methods can produce unexpected\nresults and is not recommended.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| **Caution:** When uploading a `queue.yaml` file via the gcloud CLI below version `332.0.0` uses a deprecated interface to the service. Starting on `2022-09-20`, attempts to use the upload method can fail with server errors. To resolve this, make sure the Cloud Tasks API is enabled in your project and your gcloud CLI is updated to at least version `332.0.0`.\n\nExample\n-------\n\nThe following a basic example that defines a named queue and overrides the\ndefault processing rate: \n\n queue:\n - name: my-push-queue\n rate: 1/s\n\nThe following is a more complex example of a `queue.yaml` configuration that\ndemonstrates setting up the number of task tries and modifying the default\nprocessing rate. \n\n queue:\n - name: fooqueue\n rate: 1/s\n retry_parameters:\n task_retry_limit: 7\n task_age_limit: 2d\n - name: barqueue\n rate: 1/s\n retry_parameters:\n min_backoff_seconds: 10\n max_backoff_seconds: 200\n max_doublings: 0\n - name: bazqueue\n rate: 1/s\n retry_parameters:\n min_backoff_seconds: 10\n max_backoff_seconds: 200\n max_doublings: 3\n\nSyntax\n------\n\nThe `queue.yaml` file is a YAML file whose root directive is `queue`.\nThis directive contains zero or more named queues. Each queue definition can\nspecify the following elements:\n\nDeploying the queue configuration file\n--------------------------------------\n\nDeleting queues\n---------------\n\nTo delete a queue:\n\n1. Remove the queue definition from your `queue.yaml` file.\n\n2. Upload the change to your `queue.yaml` file.\n\n gcloud app deploy queue.yaml\n3. Delete the queue in the Google Cloud console, select the queue and click\n **Delete queue**:\n\n [Go to the Task queues page](https://console.cloud.google.com/appengine/taskqueues)\n\nIf you delete a queue from the Google Cloud console, you must wait 7 days\nbefore recreating with the same name."]]