Criar tarefas pull
bookmark_borderbookmark
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Após criar uma
fila pull, é
possível criar tarefas e adicioná-las a essa fila.
Primeiro você precisa do nome
da fila, que é definido em
queue.xml
.
Em seguida use o builder e TaskOptions.Method.PULL
para adicionar a tarefa.
O exemplo a seguir coloca tarefas em uma fila pull chamada pull-queue
:
Primeiro, receba a fila usando o nome definido no queue.xml
:
Em seguida, use o método add()
da fila com TaskOptions.Method.PULL
para colocar
tarefas em uma fila pull chamada pull-queue
:
A seguir
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-03-06 UTC.
[[["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-06 UTC."],[[["Pull queues allow you to add tasks for later processing, and can be created using the specified API which is compatible with first-generation runtimes and can be utilized when upgrading to corresponding second-generation runtimes."],["Tasks are added to a pull queue using the `TaskOptions.Method.PULL` method, after obtaining the queue name from the `queue.xml` file."],["The `QueueFactory.getQueue()` method is used to access the queue by its name, as defined in the `queue.xml`."],["The `queue.add()` method, combined with `TaskOptions.Builder.withMethod(TaskOptions.Method.PULL)`, is used to place tasks into a pull queue."]]],[]]