Set up GCL for python3 (#1573)
* Set up gcl * move gcl to py3 only * Update main.py
This commit is contained in:
Родитель
3b74e907ed
Коммит
9353bc4356
7
main.py
7
main.py
|
@ -45,8 +45,13 @@ from pages import schedule
|
|||
from pages import users
|
||||
import settings
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
# Sets up Cloud Logging client library.
|
||||
if not settings.UNIT_TEST_MODE and not settings.DEV_MODE:
|
||||
import google.cloud.logging
|
||||
client = google.cloud.logging.Client()
|
||||
client.get_default_handler()
|
||||
client.setup_logging()
|
||||
|
||||
metrics_chart_routes = [
|
||||
('/data/timeline/cssanimated', metricsdata.AnimatedTimelineHandler),
|
||||
|
|
|
@ -6,6 +6,7 @@ funcsigs
|
|||
Flask==1.1.2
|
||||
google-cloud-tasks==1.5.0
|
||||
google-cloud-ndb
|
||||
google-cloud-logging
|
||||
|
||||
# Required by google-cloud-tasks
|
||||
googleapis-common-protos==1.52.0
|
||||
|
|
|
@ -47,11 +47,6 @@ DEV_MODE = (os.environ['SERVER_SOFTWARE'].startswith('Development') or
|
|||
os.environ.get('GAE_ENV', '').startswith('localdev'))
|
||||
UNIT_TEST_MODE = os.environ['SERVER_SOFTWARE'].startswith('test')
|
||||
|
||||
if not UNIT_TEST_MODE:
|
||||
# Configure logging to print INFO lines so that they are captured
|
||||
# when written to stdout on GAE py3.
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
#setting GOOGLE_CLOUD_PROJECT manually in dev mode
|
||||
if DEV_MODE or UNIT_TEST_MODE:
|
||||
APP_ID = os.environ.get('GOOGLE_CLOUD_PROJECT', 'dev')
|
||||
|
|
Загрузка…
Ссылка в новой задаче