mirror of
https://github.com/Findus23/se-simulator.git
synced 2024-09-10 05:23:47 +02:00
use new sentry SDK
This commit is contained in:
parent
0e3ce271fe
commit
5b60afbb5e
3 changed files with 8 additions and 6 deletions
8
app.py
8
app.py
|
@ -1,13 +1,19 @@
|
|||
# Blog configuration values.
|
||||
|
||||
import sentry_sdk
|
||||
from flask import Flask
|
||||
from playhouse.flask_utils import FlaskDB
|
||||
from playhouse.pool import PooledMySQLDatabase
|
||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||
|
||||
import config
|
||||
|
||||
DATABASE = PooledMySQLDatabase("se-simulator", **config.db)
|
||||
|
||||
if config.sentryDSN:
|
||||
sentry_sdk.init(
|
||||
dsn=config.sentryDSN,
|
||||
integrations=[FlaskIntegration()]
|
||||
)
|
||||
|
||||
# Create a Flask WSGI app and configure it using values from the module.
|
||||
app = Flask(__name__)
|
||||
|
|
|
@ -33,11 +33,11 @@ Pillow==6.1.0
|
|||
pycparser==2.19
|
||||
PyMySQL==0.9.3
|
||||
python-slugify==3.0.4
|
||||
raven==6.10.0
|
||||
redis==3.3.8
|
||||
requests==2.22.0
|
||||
sacremoses==0.0.34
|
||||
schema==0.6.8
|
||||
sentry-sdk==0.12.2
|
||||
six==1.12.0
|
||||
soupsieve==1.8
|
||||
text-unidecode==1.3
|
||||
|
|
|
@ -13,7 +13,6 @@ from flask_limiter.util import get_remote_address
|
|||
from flask_session import Session
|
||||
from playhouse.flask_utils import PaginatedQuery, get_object_or_404
|
||||
from playhouse.shortcuts import model_to_dict
|
||||
from raven.contrib.flask import Sentry
|
||||
from sassutils.wsgi import SassMiddleware
|
||||
|
||||
import config
|
||||
|
@ -21,9 +20,6 @@ import utils
|
|||
from app import app
|
||||
from models import *
|
||||
|
||||
if config.sentryDSN:
|
||||
sentry = Sentry(app, dsn=config.sentryDSN)
|
||||
|
||||
app.jinja_env.globals.update(prettydate=utils.prettydate)
|
||||
app.jinja_env.globals.update(is_light_color=utils.is_light_color)
|
||||
|
||||
|
|
Loading…
Reference in a new issue