Python 2.7 has reached end of support
and will be deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Python
2.7 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you migrate to the latest supported version of Python.
Stay organized with collections
Save and categorize content based on your preferences.
This page describes some limitations with using the local development server
(dev_appserver) to test push queues in your application. In most
respects, you set up your queues and tasks just as you would to run them in the
App Engine production environment, but there are some differences:
The development server doesn't respect the rate and bucket-size attributes
of your queues. As a result, tasks are executed as close to their ETA as
possible. Setting a rate of 0 doesn't prevent tasks from being executed
automatically.
The development server doesn't preserve queue state across restarts.
To prevent push tasks from running in the development server at all, use the
following command:
Replace DEVAPPSERVER_ROOT with the path to the folder where you
extract the archived version of devapp_server.py. For more information about
downloading and using the archived version of dev_appserver.py, see Using the local development server.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis API supports first-generation runtimes and is relevant when upgrading to corresponding second-generation runtimes, with a migration guide available for Python 3 runtime upgrades.\u003c/p\u003e\n"],["\u003cp\u003eThe local development server (\u003ccode\u003edev_appserver\u003c/code\u003e) has limitations regarding push queue testing, as it ignores \u003ccode\u003erate\u003c/code\u003e and \u003ccode\u003ebucket-size\u003c/code\u003e attributes, executing tasks near their ETA.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edev_appserver\u003c/code\u003e does not maintain queue state across restarts and does not support developing Python 3 apps on Windows.\u003c/p\u003e\n"],["\u003cp\u003eTo stop push tasks from running on the development server, use the \u003ccode\u003epython2 DEVAPPSERVER_ROOT/google_appengine/dev_appserver.py --enable_task_running no\u003c/code\u003e command, replacing \u003ccode\u003eDEVAPPSERVER_ROOT\u003c/code\u003e with the correct path.\u003c/p\u003e\n"],["\u003cp\u003eBefore running the \u003ccode\u003edev_appserver\u003c/code\u003e, you must run \u003ccode\u003edev_appserver.py\u003c/code\u003e with Python 3, set the \u003ccode\u003eCLOUDSDK_DEVAPPSERVER_PYTHON\u003c/code\u003e environment variable to your Python 2 interpreter, and follow the setup instructions.\u003c/p\u003e\n"]]],[],null,["# Testing Push Queues in the Development Server\n\n| This API is supported for first-generation runtimes and can be used when [upgrading to corresponding second-generation runtimes](/appengine/docs/standard/\n| python3\n|\n| /services/access). If you are updating to the App Engine Python 3 runtime, refer to the [migration guide](/appengine/migration-center/standard/migrate-to-second-gen/python-differences) to learn about your migration options for legacy bundled services.\n\nThis page describes some limitations with using the local development server\n(`dev_appserver`) to test push queues in your application. In most\nrespects, you set up your queues and tasks just as you would to run them in the\nApp Engine production environment, but there are some differences:\n\n- The development server doesn't respect the `rate` and `bucket-size` attributes of your queues. As a result, tasks are executed as close to their ETA as possible. Setting a rate of `0` doesn't prevent tasks from being executed automatically.\n- The development server doesn't preserve queue state across restarts.\n\n| **Important:**\n| - Before running the local development server, follow the [setup instructions](/appengine/docs/legacy/standard/python/tools/using-local-server#set-up). Regardless of your app's runtime or language version, you must run `dev_appserver.py` with Python 3 and set the `CLOUDSDK_DEVAPPSERVER_PYTHON` environment variable in your shell to the path of your Python 2 interpreter.\n| - The `dev_appserver` tool does not support development of Python 3 apps on Windows.\n\nTo prevent push tasks from running in the development server at all, use the\nfollowing command: \n\n python2 \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eDEVAPPSERVER_ROOT\u003c/span\u003e\u003c/var\u003e/google_appengine/dev_appserver.py --enable_task_running no\n\nReplace \u003cvar translate=\"no\"\u003eDEVAPPSERVER_ROOT\u003c/var\u003e with the path to the folder where you\nextract the archived version of `devapp_server.py`. For more information about\ndownloading and using the archived version of `dev_appserver.py`, see [Using the local development server](/appengine/docs/legacy/standard/python/tools/using-local-server#before_you_begin).\n\nFor more information about `devapp_server.py` command options, see\n[Local development server options](/appengine/docs/legacy/standard/python/tools/local-devserver-command)."]]