Search code examples
pythongoogle-app-enginetask-queue

Locally test GAE task queue scaling from automatic to manual


I am trying to change the scaling of my google app engine task queue from automatic (requires response in 10 min) to manual (extends response to 24 hr). My app.yaml file contains

application: my-application
version: alpha-1
runtime: python27
api_version: 1
threadsafe: true

I altered it to

application: my-application
version: alpha-1
runtime: python27
api_version: 1
threadsafe: true
instance_class: B1
manual_scaling:
  instances: 5

I cannot deploy this to test and am trying to test locally. Unfortunately the dev_appserver.py does not timeout after 10 minutes when I use the first app.yaml configuration (it should timeout). How should I test this? Or how can I scale properly?


Solution

  • The instance scaling can not be tested locally - the SDK doesn't have support for the actual GAE scaling logic, you need to test it on the actual GAE infrastructure.

    There are also some task queue features which aren't supported by the devserver, see Using Push Queues in the Development Server.

    In order to not affect your production environment you can create a staging/development environment, for example by creating a different project & app where to deploy the same app code (with just the app ID updated). Just as the 2nd suggestion in Naming environments, for example.