From ac760a54d1fce16ebd20aecbaec1ecef681726ec Mon Sep 17 00:00:00 2001 From: Matt Webb Date: Sat, 27 Sep 2014 15:15:20 +0100 Subject: [PATCH] tweaking to see logs on heroku --- app/__init__.py | 10 ++++++---- config.py | 1 + manage.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index b20971a..bf8e69d 100755 --- a/app/__init__.py +++ b/app/__init__.py @@ -7,6 +7,7 @@ from config import config from pprint import pprint import json import gevent +import sys bootstrap = Bootstrap() db = SQLAlchemy() @@ -16,9 +17,9 @@ sockets = Sockets() # for this to work, I have to put the following line at line 38 of # flask_sockets, to inject it into the environment # environment.environ['HTTP_SEC_WEBSOCKET_PROTOCOL'] = 'bergcloud-bridge-v1' -def protocol_name(): - print "asked for protocol" - return 'bergcloud-bridge-v1' +#def protocol_name(): +# print "asked for protocol" + # return 'bergcloud-bridge-v1' def create_app(config_name): app = Flask(__name__) @@ -30,7 +31,7 @@ def create_app(config_name): sockets.init_app(app) # maybe this sets the HTTP_SEC_WEBSOCKET_PROTOCOL ? - app.protocol_name = protocol_name + #app.protocol_name = protocol_name # attach routes and custom error pages from .main import main as main_blueprint @@ -51,6 +52,7 @@ def create_app(config_name): @sockets.route('/api/v1/connection') def coresocket(ws): print "here" + sys.stdout.flush() while True: message = ws.receive() #pprint(message) diff --git a/config.py b/config.py index dfb1eb5..aa769fb 100755 --- a/config.py +++ b/config.py @@ -25,6 +25,7 @@ class ProductionConfig(Config): class HerokuConfig(ProductionConfig): SSL_DISABLE = bool(os.environ.get('SSL_DISABLE')) + DEBUG = True @classmethod def init_app(cls, app): diff --git a/manage.py b/manage.py index 297bced..a67703e 100755 --- a/manage.py +++ b/manage.py @@ -30,7 +30,7 @@ def deploy(): # migrate database to latest revision upgrade() - + if __name__ == '__main__': manager.run() -- 2.47.3