google-app-engine-python

GCP at the standard environment: MySQL db connection refused

冷暖自知 提交于 2019-12-07 14:32:18
问题 My goal is to take a working Python 2.7 project (MySQL + MS Word files) to work at GCP. I realize that I need App Engine - where the app will be running (scaling, etc). Cloud SQL working as MySQL db. For that I've followed that Cloud SQL for MySQL tut and Cloud SQL instance is created with root user. Both App Engine app and Cloud SQL instance are in the same project. Cloud Storage The SQL second generation instance is successfully created and a root user is set. How I run or deploy I use

Google Cloud Function - AttributeError: 'module' object has no attribute 'DEFAULT_MAX_REDIRECTS'

雨燕双飞 提交于 2019-12-07 12:06:50
问题 I'm using Appengine cron job to schedule cloud function and when I deploy and try to run a job, getting below error. Any idea what could be wrong here? Followed steps from [here][1] (/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263) Traceback (most recent call last): File "/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in

Does AppEngine Cloud Trace require AppStats?

戏子无情 提交于 2019-12-07 11:57:02
问题 Google's AppEngine has upgraded their Developer's Console and it includes a monitoring tool called Cloud Trace. Is this an improved version of the AppStats profiling tool? If so, can I remove the configuration files that were previously required, like appengine_config.py and the console path in app.yaml ? builtins: - appstats: on 回答1: Cloud Trace is in beta, meaning "it's not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes", while AppStats is a

Uncaught (in promise) DOMException: Registration failed - manifest empty or missing

不羁岁月 提交于 2019-12-07 04:51:03
问题 Im trying to implement push notification using Polymer. I followed this link and was able to get the service worker to be registered. I got the following comments of the Javascript console. Service Worker is ready :^) ServiceWorkerRegistration But I also received this error. Uncaught (in promise) DOMException: Registration failed - manifest empty or missing Note: <link rel="manifest" href="manifest.json"> is already in my index.html. Since Im using Google App Engine, in my app.yaml I have add

How to restrict access to GAE Flexible site only for GSuite account?

别等时光非礼了梦想. 提交于 2019-12-06 14:39:17
How to restrict access to GAE Flexible site only for all account from my domain in GSuite and eventually other Google accounts that I provide explicitely. AFAIR there where something simillar in Standard GAE version in app.yaml handlers section. So my scenario: prodution versions restricted until go-live dev and stage version restricted permanently I would like to do this on the IAM level, to reject traffic to the site. But I didn't found anything in docs. Dzinek Ok, after rethink the problem and dig deeper in a documentation I found a page about dev environment - https://cloud.google.com

How to run long cron jobs on App Engine flexible environment?

邮差的信 提交于 2019-12-06 11:57:06
I have an app on App Engine (flexible environment) and configured a few cron jobs. These jobs should take several minutes but I see them failing after ~30 seconds (502 error). The documentation is not very clear regarding the max time of cron jobs ( Scheduling Jobs with cron.yaml ), although it seems that "An HTTP request invoked by cron can run for up to 24 hours". Any ideas of how to overcome this? Thanks in advance This is an answer to my own question. The problem I had was that I only had one Gunicorn worker. The App Engine health checks were happening every 30 seconds and there was no

Does AppEngine Cloud Trace require AppStats?

我的梦境 提交于 2019-12-06 02:27:44
Google's AppEngine has upgraded their Developer's Console and it includes a monitoring tool called Cloud Trace . Is this an improved version of the AppStats profiling tool? If so, can I remove the configuration files that were previously required, like appengine_config.py and the console path in app.yaml ? builtins: - appstats: on Cloud Trace is in beta, meaning "it's not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes", while AppStats is a supported component of App Engine. The implication, to me, is that you probably should not yet depend on Cloud

Google App Engine custom 404 page for static files

回眸只為那壹抹淺笑 提交于 2019-12-06 02:13:48
问题 I'm working on a GAE application which largely consists of static content. I've configured the following handlers: - url: /content/(.*\..*) static_files: static/content/\1 upload: static/content/(.*) - url: /content/(.+) static_files: static/content/\1.html upload: static/content/(.*)\.html The first handler is used to serve images, stylesheets, etc.; the second handles plain URLs like /content/zoo/monkeys/george and serves a corresponding HTML file. Right now, GAE is returning an empty page

Google Cloud Function - AttributeError: 'module' object has no attribute 'DEFAULT_MAX_REDIRECTS'

血红的双手。 提交于 2019-12-05 19:42:06
I'm using Appengine cron job to schedule cloud function and when I deploy and try to run a job, getting below error. Any idea what could be wrong here? Followed steps from [here][1] (/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263) Traceback (most recent call last): File "/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "/base/alloc/tmpfs

Accessing Google App Engine Python App code in production

北战南征 提交于 2019-12-02 12:59:21
问题 (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