Added bugsnag
This commit is contained in:
parent
06aadfc52b
commit
322530761e
@ -1,13 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import requests
|
import requests
|
||||||
|
import bugsnag
|
||||||
|
from bugsnag.flask import handle_exceptions
|
||||||
from eve import Eve
|
from eve import Eve
|
||||||
from pymongo import MongoClient
|
from pymongo import MongoClient
|
||||||
|
|
||||||
# import random
|
|
||||||
# import string
|
|
||||||
|
|
||||||
from eve.auth import TokenAuth
|
from eve.auth import TokenAuth
|
||||||
from eve.auth import BasicAuth
|
from eve.auth import BasicAuth
|
||||||
from eve.io.mongo import Validator
|
from eve.io.mongo import Validator
|
||||||
@ -207,6 +204,7 @@ class ValidateCustomFields(Validator):
|
|||||||
def post_item(entry, data):
|
def post_item(entry, data):
|
||||||
return post_internal(entry, data)
|
return post_internal(entry, data)
|
||||||
|
|
||||||
|
|
||||||
# We specify a settings.py file because when running on wsgi we can't detect it
|
# We specify a settings.py file because when running on wsgi we can't detect it
|
||||||
# automatically. The default path (which work in Docker) can be overriden with
|
# automatically. The default path (which work in Docker) can be overriden with
|
||||||
# an env variable.
|
# an env variable.
|
||||||
@ -218,6 +216,11 @@ app.config.from_object(config.Deployment)
|
|||||||
|
|
||||||
client = MongoClient(app.config['MONGO_HOST'], 27017)
|
client = MongoClient(app.config['MONGO_HOST'], 27017)
|
||||||
db = client.eve
|
db = client.eve
|
||||||
|
bugsnag.configure(
|
||||||
|
api_key = app.config['BUGSNAG_API_KEY'],
|
||||||
|
project_root = "/date/dev/pillar/pillar",
|
||||||
|
)
|
||||||
|
handle_exceptions(app)
|
||||||
|
|
||||||
|
|
||||||
def check_permissions(resource, method, append_allowed_methods=False):
|
def check_permissions(resource, method, append_allowed_methods=False):
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
blinker==1.4
|
||||||
bugsnag==2.3.1
|
bugsnag==2.3.1
|
||||||
Cerberus==0.8
|
Cerberus==0.8
|
||||||
cffi==1.2.1
|
cffi==1.2.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user