]> git.aero2k.de Git - sirius.git/commitdiff
tweaking to see logs on heroku
authorMatt Webb <matt@interconnected.org>
Sat, 27 Sep 2014 14:15:20 +0000 (15:15 +0100)
committerMatt Webb <matt@interconnected.org>
Sat, 27 Sep 2014 14:15:20 +0000 (15:15 +0100)
app/__init__.py
config.py
manage.py

index b20971a00fa517e479c77c560527acb71bfd6256..bf8e69d3f9739aa4a2cee19db2d8be00d2051577 100755 (executable)
@@ -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)
index dfb1eb5ac0c8d5a8b9a128f230e96214d783abd3..aa769fb71ada87bb51fcad08f989eebfe6198623 100755 (executable)
--- 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):
index 297bced0b1ac8eff8be39a05a7ab0b005c5aa747..a67703e67ddb094f2ac5aa57550012401935623f 100755 (executable)
--- a/manage.py
+++ b/manage.py
@@ -30,7 +30,7 @@ def deploy():
        # migrate database to latest revision
        upgrade()
 
-
+       
 if __name__ == '__main__':
     manager.run()