On my Google AppEngine (GAE) server, I would like to do something like this:
if (thisIsTheDefaultServer) { // behave normally } else { // Accept special test-commands, give extra output, etc. }
Is there a way for server code to determine if it is the current default version?
Thank!
I remember that the Google App Engine team mentions an API to get something from the toolbar. Sorry, I can not find it at the moment. I think it could be in this conversation: http://www.google.com/events/io/2011/sessions/life-in-app-engine-production.html
, , Java. , Python.
Java (http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/utils/SystemProperty.html):
if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) { // do something that production-only } String version = SystemProperty.version.get();
Cheers, Jacob
, . spring:
version.app.appspot.com
(Java Python)
CURRENT_VERSION_ID Python SDK , app.yaml, , com.google.appengine.runtime.version Java runtine.
CURRENT_VERSION_ID