google-app-engine-python

Is it possible to upload a file by url to cloud storage on app engine without writing to disk?

南笙酒味 提交于 2019-12-02 07:25:49
问题 To upload a file from url to a cloud storage system, usually it is required to download that file on a server, and then upload it to the cloud storage. For large files, it may be required to write the file on disk instead of memory. Since app engine does not support writing on disks, are there any other options for doing this on app engine? I understand that managed vm is an option, but I'm trying to make sure that it's definitely not possible to do this on classic app engine. 回答1: To

TransactionFailedError (too much contention…) when reading (cross-group) entities from datastore

此生再无相见时 提交于 2019-12-02 04:34:25
I’m investigating again the unexpected occurrence of TransactionFailedError (too much contention on these datastore entities... in cases, where the code only reads entity groups that are blamed for the contention problems. Setup GAE standard environment, Python 2.7 with NDB (SDK 1.9.51). I managed to observe the error in an isolated app (only me as user) where the same request handler is executed in a task queue and read/write access to the entity-groups mentioned below is only done by this handler. The handler is executed a few times per second and basically is a migration / copy task to move

App Engine Flexible + App Identity (Python)

被刻印的时光 ゝ 提交于 2019-12-02 04:07:40
Is there a way to port the functionality of from google.appengine.api import app_identity from google.appengine.api import urlfetch in the flexible environment? I have a service running on the flex environment which needs to make a request to the standard environment and would like to use App Engine's native app identity and X-Appengine-Inbound-Appid header to do so. It seems that if the origin of the request is from the standard environment, the header is passed on to the flex environment but not the other way around? Update: It is not possible to use the X-Appengine-Inbound-Appid header in

Accessing Google App Engine Python App code in production

十年热恋 提交于 2019-12-02 03:15:54
(Background: I am new to Google App Engine, familiar with other cloud providers' services) I am looking for access/view similar to shell access to production node. With a Python/Django based Google App Engine App, I would like to view the code in production. One view I could find is the StackDriver 'Debug' view. However, apparently the code shown in the Debug view doesn't reflect the updated production code (based on what is showing on the production site, for example, the text on the home page different). Does Google App Engine allow me to ssh into the VM where the application/code is running

Not able to change the frontend instance class in appengine application

痴心易碎 提交于 2019-12-02 02:30:43
Specified in app.yaml instance_class: F2 automatic_scaling: min_idle_instances: 5 max_idle_instances: automatic Is their any way out to check instance tier/class from developer console? Only able to guess instance class from billing status costing $0.05 per hour ie F1 instance class. On the new console https://console.cloud.google.com , go to App Engine, then Versions. Under the dropdown More Columns, select Instance Class, then the instance class column will be displayed. I could not find a place where to check specifically the instance type. The only way I could verify that my instance was

GAE deferred task retried due to “instance unavailable” despite having already succeeded

旧城冷巷雨未停 提交于 2019-12-02 02:16:17
In our GAE application, we occasionally see TombstonedTaskError errors in deferred tasks due to named tasks being submitted multiple times with identical names. These tasks seem to be occasionally resubmitted automatically by GAE despite the first execution of the deferred task succeeding. An example can be seen in this log screenshot : the task "refresh_stock_status-1451012400-GNeg-completion-poll-2" was submitted on the morning of Dec 25th, and completed 12-25 07:35:05. The task was then, for some reason, retried automatically by GAE ("X-Appengine-Taskretrycount:1") at 07:35:18, with the

TransactionFailedError (too much contention…) when reading (cross-group) entities from datastore

浪尽此生 提交于 2019-12-01 08:53:29
问题 I’m investigating again the unexpected occurrence of TransactionFailedError (too much contention on these datastore entities... in cases, where the code only reads entity groups that are blamed for the contention problems. Setup GAE standard environment, Python 2.7 with NDB (SDK 1.9.51). I managed to observe the error in an isolated app (only me as user) where the same request handler is executed in a task queue and read/write access to the entity-groups mentioned below is only done by this

New project structure for Google App Engine

泪湿孤枕 提交于 2019-12-01 07:10:40
I see that there is already an answer to this question but I feel its outdated. Many things have changes since then. There are now modules , cloud_endpoints and webapp2 . What should be the good directory structure for my project which allows me to add/modify features easily. For example I should be able to manage: Modules. Cron jobs. Task queues. Cloud endpoints. Dan Cornilescu I'd first take a look at modules, at least for these reasons: modules really are in many respects (almost) equivalents to entire (single-module) apps in older docs/references, so once a module's position in the app's

New project structure for Google App Engine

你说的曾经没有我的故事 提交于 2019-12-01 05:05:32
问题 I see that there is already an answer to this question but I feel its outdated. Many things have changes since then. There are now modules, cloud_endpoints and webapp2. What should be the good directory structure for my project which allows me to add/modify features easily. For example I should be able to manage: Modules. Cron jobs. Task queues. Cloud endpoints. 回答1: I'd first take a look at modules, at least for these reasons: modules really are in many respects (almost) equivalents to

How to use Python 3 with Google App Engine's Local Development Server

与世无争的帅哥 提交于 2019-12-01 04:35:49
I've got a local Python application configured with runtime: python in it's app.yaml file. When starting the local development server with dev_appserver.py app.yaml all is fine. Since GAE's Local Development Server uses Python2.7 by default, I now want to make use of Python3.x instead. According to Google's documentation, we have to use the flexible environment . Thus I'm changing app.yaml to: runtime: python env: flex runtime_config: python_version: 3 Now dev_appserver.py app.yaml spits out: Under dev_appserver, runtime:python is not supported for Flexible environment. The problem can be