google-app-engine

How to set loglevel of the Appengine DataStore in Java

ε祈祈猫儿з 提交于 2020-01-14 13:37:28
问题 I have a logging.properties file in my Java AppEngine project (using java.util.logging ) that looks like this: # Set the default logging level for all loggers to WARNING .level = INFO # tighten logging on the DataNucleus Categories DataNucleus.JDO.level=WARN # - All messages general to JDO DataNucleus.JPA.level=WARN # - All messages general to JPA DataNucleus.Persistence.level=WARN # - All messages relating to the persistence process DataNucleus.Query.level=WARN # - All messages relating to

Google app engine or query (python)

試著忘記壹切 提交于 2020-01-14 12:57:48
问题 Can anyone share your approach for doing a 'or' query in app-engine? Let say I have class A_db_model(db.Model): valueA = db.ListProperty(basestring) in valueA I have aaa aaa, bbb bbb ccc I would like to return result of if the valueA match 'aaa' or 'bbb' and return not duplicated result. 回答1: Try this? A_db_model.all().filter('valueA IN', ['aaa', 'bbb']) or the equivalent GQL: GqlQuery('SELECT * FROM A_db_model WHERE valueA IN :1', ['aaa', 'bbb']) 回答2: The two main problems with @Amber's

Drive API Files Patch Method fails with “Precondition Failed” “conditionNotMet”

余生颓废 提交于 2020-01-14 12:35:42
问题 It seems that over night the Google Drive API methods files().patch( , ).execute() has stopped working and throws an exception. This problem is also observable through Google's reference page https://developers.google.com/drive/v2/reference/files/patch if you "try it". The exception response is: 500 Internal Server Error cache-control: private, max-age=0 content-encoding: gzip content-length: 162 content-type: application/json; charset=UTF-8 date: Thu, 22 Aug 2013 12:32:06 GMT expires: Thu,

EOF error with Google oauth2client (Python, google-app-engine)

蓝咒 提交于 2020-01-14 12:35:12
问题 I am currently using oauth2client in my Python webapp in order to use Google's calendar API. I copied oauth2client into the root folder of my directory, and followed instructions at https://developers.google.com/google-apps/calendar/instantiate. Which means my code looks like: import httplib2 import gflags from apiclient.discovery import build from oauth2client.file import Storage from oauth2client.client import OAuth2WebServerFlow from oauth2client.tools import run FLAGS = gflags.FLAGS FLOW

EOF error with Google oauth2client (Python, google-app-engine)

為{幸葍}努か 提交于 2020-01-14 12:34:12
问题 I am currently using oauth2client in my Python webapp in order to use Google's calendar API. I copied oauth2client into the root folder of my directory, and followed instructions at https://developers.google.com/google-apps/calendar/instantiate. Which means my code looks like: import httplib2 import gflags from apiclient.discovery import build from oauth2client.file import Storage from oauth2client.client import OAuth2WebServerFlow from oauth2client.tools import run FLAGS = gflags.FLAGS FLOW

Drive API Files Patch Method fails with “Precondition Failed” “conditionNotMet”

痞子三分冷 提交于 2020-01-14 12:32:45
问题 It seems that over night the Google Drive API methods files().patch( , ).execute() has stopped working and throws an exception. This problem is also observable through Google's reference page https://developers.google.com/drive/v2/reference/files/patch if you "try it". The exception response is: 500 Internal Server Error cache-control: private, max-age=0 content-encoding: gzip content-length: 162 content-type: application/json; charset=UTF-8 date: Thu, 22 Aug 2013 12:32:06 GMT expires: Thu,

How to enable DEBUG logging on Objectify

眉间皱痕 提交于 2020-01-14 12:19:19
问题 I am working with objectify to manage data in google datastore. But in some case i would like to see a debug trail of what happens during my Key lookup or a Query I am aware of App Stats when deployed to GAE. But, is there a way to enable some sort of DEBUG logging on Objectify? Thank you 回答1: Might you be looking at something like a logger? enabling this (for Java) or this (for Python) might be a good solution for you. It logs to your console in the devserver, or directly to your admin

App engine endpoints API - 404 with custom domain

送分小仙女□ 提交于 2020-01-14 12:17:07
问题 I'm trying to use custom domain with app engine. Everything works fine with localhost and appspot url. But with custom domain endpoints api doesn't work; the API discovery request (https://cc.mdsarowar.me/_ah/api/discovery/v1/apis/conference/v1/rest) returns Not Found with error code 404 . Here is my app.yaml (full code): - url: /_ah/spi/.* script: conference.api secure: optional And endpoints api (full code): @endpoints.api( name='conference', version='v1', allowed_client_ids=[WEB_CLIENT_ID,

App engine endpoints API - 404 with custom domain

江枫思渺然 提交于 2020-01-14 12:15:32
问题 I'm trying to use custom domain with app engine. Everything works fine with localhost and appspot url. But with custom domain endpoints api doesn't work; the API discovery request (https://cc.mdsarowar.me/_ah/api/discovery/v1/apis/conference/v1/rest) returns Not Found with error code 404 . Here is my app.yaml (full code): - url: /_ah/spi/.* script: conference.api secure: optional And endpoints api (full code): @endpoints.api( name='conference', version='v1', allowed_client_ids=[WEB_CLIENT_ID,

How does incr work with expiry times?

十年热恋 提交于 2020-01-14 11:57:46
问题 In memcached (appengine api implementation), how does expiration interact with incr()? There isn't a time argument for incr(), but what happens if I add the key with another call rather than using the initial_value param, like so: memcache.add('testcounter', 0, time=60*90) newcnt = memcache.incr('testcounter') will testcounter still expire in 90 minutes? Whether or not I call this again in that time? 回答1: In the memcache overview of GAE they say: "The app can provide an expiration time when a