Como testar filas push no servidor de desenvolvimento
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Nesta página, descrevemos algumas limitações no uso do servidor de desenvolvimento local
(dev_appserver) para o teste de filas push no aplicativo. Na maior parte,
você configura as filas e tarefas como faria para executá-las no
ambiente de produção do App Engine, mas há algumas diferenças:
O servidor de desenvolvimento não respeita os atributos rate e bucket-size
de suas filas. Desse modo, as tarefas são executadas o mais próximo possível do ETA. A configuração de uma taxa 0 não impede que tarefas sejam executadas automaticamente.
O servidor de desenvolvimento não preserva o estado da fila durante reinicializações.
Para evitar que tarefas push sejam executadas no servidor de desenvolvimento, use o seguinte comando:
python2 DEVAPPSERVER_ROOT/google_appengine/dev_appserver.py --enable_task_running no
Substitua DEVAPPSERVER_ROOT pelo caminho para a pasta em que você
extrai a versão arquivada de devapp_server.py. Para mais informações sobre
como fazer o download e usar a versão arquivada de dev_appserver.py, consulte Como usar o servidor de desenvolvimento local.
[[["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-08-04 UTC."],[[["This API is compatible with first-generation runtimes and can be used when upgrading to the corresponding second-generation runtimes, with a specific migration guide available for those updating to App Engine PHP 7/8."],["The local development server (`dev_appserver`) has limitations, notably not respecting the `rate` and `bucket-size` attributes of queues, leading to tasks running close to their ETA without considering set rates."],["The local development server's queue state is not saved across restarts."],["Before running the local development server, specific setup steps must be followed, including using Python 3 for `dev_appserver.py` and setting the `CLOUDSDK_DEVAPPSERVER_PYTHON` environment variable to the Python 2 interpreter's path."],["To prevent push tasks from running in the development server, use the command `python2 DEVAPPSERVER_ROOT/google_appengine/dev_appserver.py --enable_task_running no`, replacing `DEVAPPSERVER_ROOT` with the appropriate path."]]],[]]