[[["易于理解","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\u003equeue.yaml\u003c/code\u003e file is used to configure both push and pull task queues, with all App Engine apps having a preconfigured \u003ccode\u003edefault\u003c/code\u003e push queue.\u003c/p\u003e\n"],["\u003cp\u003ePush queues can be configured using either \u003ccode\u003equeue.yaml\u003c/code\u003e or Queue Management methods from Cloud Tasks, but using both methods simultaneously is not recommended due to potential unexpected outcomes.\u003c/p\u003e\n"],["\u003cp\u003eEach queue defined in \u003ccode\u003equeue.yaml\u003c/code\u003e can be customized with elements like \u003ccode\u003erate\u003c/code\u003e, \u003ccode\u003eretry_parameters\u003c/code\u003e, \u003ccode\u003ebucket_size\u003c/code\u003e, and \u003ccode\u003emax_concurrent_requests\u003c/code\u003e to manage task processing and retry behavior.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a Google-assigned code based on the region selected when creating an app, included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a queue requires removing it from the \u003ccode\u003equeue.yaml\u003c/code\u003e file, deploying the updated file, and then deleting it in the Google Cloud console; there is a 7-day waiting period before recreating a queue with the same name.\u003c/p\u003e\n"]]],[],null,["# queue.yaml Reference\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/go111/how-requests-are-routed#region-id). \nOK\n\nThe `queue.yaml` configuration file is used to create and configure almost all\nof the task queues\n\n([push](/appengine/docs/legacy/standard/go111/taskqueue/push) or [pull](/appengine/docs/legacy/standard/go111/taskqueue/pull))\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\n\u003cbr /\u003e\n\nTo configure push queues, you 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.\nTo configure pull queues, you must use the `queue.yaml` file.\n\n\u003cbr /\u003e\n\n| **Caution:** 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 processing 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\nThe following elements can be specified for all queues within an app:\n\nDeploying the queue configuration file\n--------------------------------------\n\nThe `queue.yaml` file should reside in your source code directory with your application code, for example, with the `.go` file.\n\nTo deploy the queue configuration file, run the following command: \n\n gcloud app deploy queue.yaml\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."]]