[google-appengine] check if in transaction?
hi all, does anybody know the best way to check if something is run in a transaction. i need this to avoid nested transactions. in google.appengine.api.datastore there is a private function in _CurrentTransactionKey() that seems to do what i want, but i am not sure if its good to use it. for example the query checker is done like this if _CurrentTransactionKey(): raise datastore_errors.BadRequestError( "Can't query inside a transaction.") thx, bernd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: check if in transaction?
On Sep 2, 1:17 am, ryan <[EMAIL PROTECTED]> wrote: > having said that, the python API already detects and prohibits nested > transactions. from the beginning of RunInTransaction() in > datastore.py: > > if _CurrentTransactionKey(): > raise datastore_errors.BadRequestError( > 'Nested transactions are not supported.') > > if you want to handle nested transactions yourself, you could just > catch BadRequestError exceptions. hi ryan. i actually got that error, i need to do something in a transaction, that might also be triggered by another function that already runs in a transaction, so it's ok for me to use the already running transaction. thx, for the clarification --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] 500 status on apps, api changes?
hello we encounter failures on some apps since about 10 hours. we can find no log entry for those errors. are there some api changes? we know of at least one change on how db.Model gets constructed, they now get the "key" keyword argument, which is new and broke another app of us, which we were able to fix. but for this app it must be another problem, are there any other changes on the internals? we have 2 apps with the same symtpoms. curl -i http://marktplatz.a-z.ch HTTP/1.1 500 Internal Server Error Date: Tue, 09 Feb 2010 08:26:19 GMT Content-Type: text/html; charset=UTF-8 Server: Google Frontend Content-Length: 466 X-XSS-Protection: 0 500 Server Error Error: Server Error The server encountered an error and could not complete your request.If the problem persists, please report your problem and mention this error message and the query that caused it. thx in advance, bernd -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: 500 status on apps, api changes?
seems that i have found the problem, the signature of db.get has changed, but only on appengine, we have put a wrapper around this and this does not work anymore now 02-09 12:35AM 40.319 UNHANDLED_EXCEPTION: Traceback (most recent call last): File "/base/data/home/apps/mk-a-z/3.339622665704014614/packages/ django.egg/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/base/data/home/apps/mk-a-z/3.339622665704014614/packages/ django.egg/django/views/decorators/cache.py", line 30, in _cache_controlled response = viewfunc(request, *args, **kw) File "/base/data/home/apps/mk-a-z/3.339622665704014614/mkapp/ decorators.py", line 58, in wrapper data = fxn(*args, **kwargs) File "/base/data/home/apps/mk-a-z/3.339622665704014614/mkapp/df/ views.py", line 642, in business_view business = Business.get_by_ident(id) File "/base/data/home/apps/mk-a-z/3.339622665704014614/mkapp/ business.py", line 149, in get_by_ident business = Business.get_by_key_name(key) File "/base/python_lib/versions/1/google/appengine/ext/db/ __init__.py", line 991, in get_by_key_name return get(keys[0], rpc=rpc) TypeError: get_cached() got an unexpected keyword argument 'rpc' -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] Re: 500 status on apps, api changes?
ok, we now fixed the compatibility issues on our apps, but the development sdk still does not match the api on appengine. it would be nice to get information about such internal changes up- front the next time. it is always hard to explain our customers why the site was offline for some technical reason we cannot forsee. thx, bernd -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] again down
hi google team appengine seems to be down again, like yesterday. what is the status of these downtimes? thx, bernd -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
[google-appengine] new quota exception?
is anybody aware of a hidden quota limit, i get the exception below, but in the dashboard i cannot see any quotas exceeded, when this happens, the dataviewer is also non-functional any clues? thx Exception while handling service_name: "remote_datastore" method: "RunQuery" request < "stripped"> Traceback (most recent call last): File "/base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py", line 265, in post response_data = self.ExecuteRequest(request) File "/base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py", line 293, in ExecuteRequest response_data) File "/base/python_lib/versions/1/google/appengine/api/ apiproxy_stub.py", line 80, in MakeSyncCall method(request, response) File "/base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py", line 84, in _Dynamic_RunQuery request, runquery_response) File "/base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py", line 72, in MakeSyncCall apiproxy.MakeSyncCall(service, call, request, response) File "/base/python_lib/versions/1/google/appengine/api/ apiproxy_stub_map.py", line 255, in MakeSyncCall rpc.CheckSuccess() File "/base/python_lib/versions/1/google/appengine/api/ apiproxy_rpc.py", line 111, in CheckSuccess raise self.exception OverQuotaError: The API call datastore_v3.RunQuery() required more quota than is available. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] patterns for expiration settings for static files
is it possible to serve a static directory with a given expiration time while serving a contained file with a different expiration. for example this does not work for me: - url: /static expiration: 1d static_dir: static - url: /static/admin/xy\.nocache\.js expiration: 60s static_dir: static thx in advance, bernd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: patterns for expiration settings for static files
thx a lot just for the records: you dont need default_expiration but the static_files directive, the specific url needs to be first - url: /static/admin/xy\.nocache\.js expiration: 60s static_files: static/admin/xy.nocache.js upload: static/admin/xy.nocache.js - url: /static expiration: 1d static_dir: static thx, bernd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] indexes for "and" queries
if i do this to find any entities that match house and dog i do Searchable.all().filter('content_type =', 'something').filter('words =', 'house').filter('words =', 'dog'). order('c_time') is it right that i need an index for every number of words? so if i want to support searches for "cats dogs pets" i need an additional index? get_data failed no matching index found. This query needs this index: - kind: Searchable properties: - name: content_type - name: words - name: words - name: c_time direction: desc thx, in advance, bernd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: How to set a property is unique key in app engine?
On Nov 6, 10:37 am, mawei1981 <[EMAIL PROTECTED]> wrote: > Hi, All > > As we know, the database provide a unique key not a primary key to > support we store some content we do not like redundant, we query some > content use distinct because we do not want to see redundant record. > > So, when I store some url or email address in my spider(written under > app engine), I need to create a entity to store the content, and I > guess I don't need to execute a GQL to check it has exist. up till now you have to see http://code.google.com/p/googleappengine/issues/detail?id=178 > > Someone can tell me, Does app engine has this Property of db.Model? > > Maven > 2008-11-06 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] index status "building" since days
i have an index that is on status "building" since about a week, i don't need it anymore, but vacuum says that the index is already deleted: Deleting selected index definitions. 2008-11-18 07:12:46,146 WARNING appcfg.py:892 An index was not deleted. Most likely this is because it no longer exists. my import script, which works on the entity-level is now getting "Resource temporarily unavailable", now i don't know if this is because of the dangling index and i just have to wait, or some other reason. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] remote api, when?
hi all there is an undocumented remote api client in the 1.1.8 sdk which i tried, but it seems the protocoll buffer implementation is not available on appengine, just in the sdk. this error is raised when calling the remote_api handler : cannot import name remote_api_pb Traceback (most recent call last): File "/base/python_lib/versions/1/google/appengine/ext/remote_api/ handler.py", line 50, in from google.appengine.ext.remote_api import remote_api_pb File "/base/python_lib/versions/1/google/appengine/ext/remote_api/ __init__.py", line 72, in from google.appengine.ext.remote_api import remote_api_pb : cannot import name remote_api_pb does anybody know when this feature will be enabled? thx in advance, BErnd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: remote api, when?
wow, nice to hear ... this feature really rocks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: SDK version 1.1.9 Released
that's great news! especially the remote_api is great! you rock guys :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] service problems
as of the time of this writing, we encounter serios problems on two of our apps. we see arbitrary DeadlineExceededErrors in the logs is there any known issue right now? thx, bernd -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.