Skip to content

Commit

Permalink
Add Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
kylase committed Jul 9, 2018
1 parent 39daede commit 270da61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ gunicorn==19.8.1
gensim==3.4.0
flask_restful==0.3.6
flask-restful-swagger-2==0.35
flask-swagger-ui==3.6.0
flask-swagger-ui==3.6.0
raven[flask]==6.9.0
7 changes: 5 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import os
from flask.helpers import get_debug_flag
from raven.contrib.flask import Sentry
from app import create_app
from app.settings import ProductionConfig, DevelopmentConfig

CONFIG = DevelopmentConfig if get_debug_flag() else ProductionConfig

app = create_app(CONFIG)

sentry = Sentry(app)

if __name__ == '__main__':
app.run(host=os.getenv('HOST', default='0.0.0.0'),
port=int(os.getenv('PORT', default='5000')))
app.run(host=os.getenv('HOST', default='0.0.0.0'),
port=int(os.getenv('PORT', default='5000')))

0 comments on commit 270da61

Please sign in to comment.