From 2b5073d536bc554a9feb7e0422c917dceef0ba14 Mon Sep 17 00:00:00 2001 From: Nick Walton Date: Sun, 7 Apr 2019 18:08:20 -0600 Subject: [PATCH] added debugger --- app.yaml | 4 +--- main.py | 6 ++++++ requirements.txt | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app.yaml b/app.yaml index c3474eb..9def78f 100644 --- a/app.yaml +++ b/app.yaml @@ -1,9 +1,7 @@ runtime: python runtime_config: python_version: 3 - -instance_class: B8 -entrypoint: gunicorn -t 120 --log-level debug -b :$PORT main:app +entrypoint: gunicorn -t 240 --log-level debug --debug -b :$PORT main:app threadsafe: true env: flex diff --git a/main.py b/main.py index b2497a0..9419a37 100644 --- a/main.py +++ b/main.py @@ -19,6 +19,12 @@ import tensorflow as tf from flask import g import pdb +try: + import googleclouddebugger + googleclouddebugger.enable() +except ImportError: + pass + import json from flask import Flask, render_template, request diff --git a/requirements.txt b/requirements.txt index 71e00f8..ad3eeff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ numpy tensorflow flask gunicorn +google-python-cloud-debugger