[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a code assigned by Google based on the region selected during app creation, included in App Engine URLs for apps created after February 2020, but it does not directly correspond to specific countries or provinces.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003equeue.yaml\u003c/code\u003e file configures push task queues for App Engine apps, including the default queue, and allows adding additional queues or altering the default queue's settings.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003equeue.yaml\u003c/code\u003e and Cloud Tasks Queue Management methods should not be mixed when configuring push queues, as doing so can cause unexpected issues, which is why it is recommended to use one method or the other.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003equeue.yaml\u003c/code\u003e file defines queue elements like \u003ccode\u003ebucket_size\u003c/code\u003e, \u003ccode\u003emax_concurrent_requests\u003c/code\u003e, \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003erate\u003c/code\u003e, \u003ccode\u003eretry_parameters\u003c/code\u003e, and \u003ccode\u003etarget\u003c/code\u003e, which control how tasks are processed and managed.\u003c/p\u003e\n"],["\u003cp\u003eTo deploy changes made in \u003ccode\u003equeue.yaml\u003c/code\u003e you need to run \u003ccode\u003egcloud app deploy queue.yaml\u003c/code\u003e, and to delete a queue, its definition must be removed from the file, deployed, and then deleted in the Google Cloud console.\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/php/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\n([push](/appengine/docs/legacy/standard/php/taskqueue/push))\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.\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 the root directory or in the directory that defines the default service.\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."]]