Nesta página, mostramos como criar filas pull. É preciso criar a fila antes
de adicionar tarefas a ela. Também descrevemos como pausar ou excluir uma fila.
Como definir filas com queue.yaml
É possível definir filas pull usando o arquivo queue.yaml para o aplicativo.
O processo é o mesmo de criar filas push nomeadas, com uma diretiva especializada, mode: pull, adicionada ao arquivo.
queue:-name:my-queue-namemode:pull
Use o comando gcloud da CLI gcloud para fazer upload do arquivo.
gcloudappdeployqueue.yaml
Como desativar filas
Para desativar ou pausar uma fila, remova a definição dela do arquivo de configuração e faça o upload do arquivo atualizado.
Depois que o arquivo atualizado é carregado, a fila é definida como "desativada"
e sua taxa é definida como 0. Nem as tarefas que estiverem na fila nem as
novas tarefas adicionadas serão processadas. Para reativar a fila,
faça upload de um novo arquivo de fila com a fila definida.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-03-24 UTC."],[[["This guide details the process of creating pull queues using the `queue.yaml` file, which requires adding a `mode: pull` directive and deploying the file via the `gcloud app deploy queue.yaml` command."],["Pull queues can be paused by removing their definition from the `queue.yaml` file and re-deploying, effectively setting the queue's rate to 0, but can be re-enabled by adding them back in."],["Deleting a pull queue involves first disabling it by removing its definition from `queue.yaml`, uploading the updated file, and then using the Google Cloud console to complete the deletion."],["Using a service account for queue configuration deployment requires the `serviceusage.services.list` permission, accessible through the `serviceusage.serviceUsageViewer` role or a custom role."],["Mixing the `queue.yaml` method with Queue Management methods is discouraged, and using `gcloud` CLI versions older than `332.0.0` for uploading `queue.yaml` can result in errors, requiring an update and enabled Cloud Tasks API."]]],[]]