google-app-engine

different entity group on transaction using google-cloud-ndb

↘锁芯ラ 提交于 2020-02-28 09:48:49
问题 I would like to run a transaction operation in Google App Engine using google-cloud-ndb. I deployed this app. Here is my code. # -*- coding: utf-8 -*- from flask import Flask from google.cloud import ndb import time app = Flask(__name__) class Book(ndb.Model): hoge = ndb.IntegerProperty() class Book2(ndb.Model): hoge = ndb.IntegerProperty() @ndb.transactional() def test1(): ent = ndb.Key(Book, "a").get() print("after get: %s", ent) ent.hoge = ent.hoge + 1 ent.put() print("after put: %s", ent)

different entity group on transaction using google-cloud-ndb

自闭症网瘾萝莉.ら 提交于 2020-02-28 09:48:34
问题 I would like to run a transaction operation in Google App Engine using google-cloud-ndb. I deployed this app. Here is my code. # -*- coding: utf-8 -*- from flask import Flask from google.cloud import ndb import time app = Flask(__name__) class Book(ndb.Model): hoge = ndb.IntegerProperty() class Book2(ndb.Model): hoge = ndb.IntegerProperty() @ndb.transactional() def test1(): ent = ndb.Key(Book, "a").get() print("after get: %s", ent) ent.hoge = ent.hoge + 1 ent.put() print("after put: %s", ent)

connect Google App Engine and Google Compute Engine

喜夏-厌秋 提交于 2020-02-27 09:49:29
问题 I created a VM instance in Googl Compute Engine and app in Google App Engine standard environment. I was planning to have my app in App Engine and my database server in Compute Engine. But, I can't connect between the both by internal IP. Is this possible? the app and db are in the same zone ( us-east1 ) but the connection by IP don't work, only work with external IP. Apparently, the rules of firewall are correct. 回答1: For connecting through a private IP you need that the app and DB will be

How to deploy Vue.js app on Google App Engine?

限于喜欢 提交于 2020-02-27 03:56:34
问题 I created a simple Vue.js application. Then I created a build for production using npm run build command which creates dist folder in the project structure. Then I use gcloud app deploy command to deploy it to Google App Engine, but then the deployment stops and gives error as: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: This deployment has too many files. New versions are limited to 10000 files for this app. Can someone please tell me what is the proper way to deploy Vue.js application to

How to deploy Vue.js app on Google App Engine?

廉价感情. 提交于 2020-02-27 03:54:49
问题 I created a simple Vue.js application. Then I created a build for production using npm run build command which creates dist folder in the project structure. Then I use gcloud app deploy command to deploy it to Google App Engine, but then the deployment stops and gives error as: ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: This deployment has too many files. New versions are limited to 10000 files for this app. Can someone please tell me what is the proper way to deploy Vue.js application to

Error running endpointscfg.py get_swagger_spec

核能气质少年 提交于 2020-02-25 21:46:50
问题 I am trying to build a project using Google Cloud Endpoints, following this guide: Quickstart for Cloud Endpoints Frameworks on App Engine. I am stuck at the step of generating the OpenAPI configuration file, where I need to run this command: Attempt One $ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com I get this error: -bash: lib/endpoints/endpointscfg.py: Permission denied Attempt Two I have tried the same command with sudo , which returned

Error running endpointscfg.py get_swagger_spec

北慕城南 提交于 2020-02-25 21:44:22
问题 I am trying to build a project using Google Cloud Endpoints, following this guide: Quickstart for Cloud Endpoints Frameworks on App Engine. I am stuck at the step of generating the OpenAPI configuration file, where I need to run this command: Attempt One $ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com I get this error: -bash: lib/endpoints/endpointscfg.py: Permission denied Attempt Two I have tried the same command with sudo , which returned

How to secure connection between different GAEs?

為{幸葍}努か 提交于 2020-02-25 06:09:35
问题 For some reason I need to create two GAEs with project A and B: A(flex env) is a proxy server bounded with Endpoint and restrict access with API key. B(standard env) is real server which does real jobs.(B cannot apply Endpoint framework) Client only awares proxy server address and send all requests to A Now I would like to secure connection between A and B. In other words, B is only accessible from A. Is there any way to achieve it? (Firewall not work here because GAE has not static IP range.

How to secure connection between different GAEs?

余生颓废 提交于 2020-02-25 06:06:40
问题 For some reason I need to create two GAEs with project A and B: A(flex env) is a proxy server bounded with Endpoint and restrict access with API key. B(standard env) is real server which does real jobs.(B cannot apply Endpoint framework) Client only awares proxy server address and send all requests to A Now I would like to secure connection between A and B. In other words, B is only accessible from A. Is there any way to achieve it? (Firewall not work here because GAE has not static IP range.

How to locally unit test python 3 app engine application?

…衆ロ難τιáo~ 提交于 2020-02-24 14:35:18
问题 I have testbed setup locally to test python2.7 based app engine application. As part of the python3 migration activity, I am wondering how do I setup the app engine testbed. It seems I can't use my existing python2.7 testbed because of the changes in app engine libraries. Can anybody help me in setting it up? 回答1: I couldn't find any relevant doc for the new AppEngine 3 environment and the testbed package. According to the documentation in the python docs for AppEngine the testbed package