.BANCHO. Add tornado-sentry capture decorators
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import json
|
||||
|
||||
from common.log import logUtils as log
|
||||
import tornado.web
|
||||
import tornado.gen
|
||||
|
||||
from common.sentry import sentry
|
||||
from common.web import requestsManager
|
||||
from constants import exceptions
|
||||
from helpers import chatHelper
|
||||
@@ -8,6 +11,9 @@ from objects import glob
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncGet(self):
|
||||
statusCode = 400
|
||||
data = {"message": "unknown error"}
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import json
|
||||
|
||||
import tornado.web
|
||||
import tornado.gen
|
||||
|
||||
from common.sentry import sentry
|
||||
from common.ripple import userUtils
|
||||
from common.web import requestsManager
|
||||
from constants import exceptions
|
||||
@@ -7,6 +11,9 @@ from objects import glob
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncGet(self):
|
||||
statusCode = 400
|
||||
data = {"message": "unknown error"}
|
||||
|
@@ -1,10 +1,17 @@
|
||||
import json
|
||||
|
||||
import tornado.web
|
||||
import tornado.gen
|
||||
|
||||
from common.sentry import sentry
|
||||
from common.web import requestsManager
|
||||
from objects import glob
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncGet(self):
|
||||
statusCode = 400
|
||||
data = {"message": "unknown error"}
|
||||
|
@@ -1,10 +1,17 @@
|
||||
import json
|
||||
|
||||
import tornado.web
|
||||
import tornado.gen
|
||||
|
||||
from common.sentry import sentry
|
||||
from common.web import requestsManager
|
||||
from objects import glob
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncGet(self):
|
||||
statusCode = 400
|
||||
data = {"message": "unknown error"}
|
||||
|
@@ -1,11 +1,18 @@
|
||||
import json
|
||||
|
||||
import tornado.web
|
||||
import tornado.gen
|
||||
|
||||
from common.sentry import sentry
|
||||
from common.web import requestsManager
|
||||
from constants import exceptions
|
||||
from objects import glob
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncGet(self):
|
||||
statusCode = 400
|
||||
data = {"message": "unknown error"}
|
||||
|
@@ -1,5 +1,9 @@
|
||||
import json
|
||||
|
||||
import tornado.web
|
||||
import tornado.gen
|
||||
|
||||
from common.sentry import sentry
|
||||
from common.log import logUtils as log
|
||||
from common.web import requestsManager
|
||||
from constants import exceptions
|
||||
@@ -8,6 +12,9 @@ from objects import glob
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncGet(self):
|
||||
statusCode = 400
|
||||
data = {"message": "unknown error"}
|
||||
|
@@ -56,13 +56,14 @@ from events import tournamentJoinMatchChannelEvent
|
||||
from events import tournamentLeaveMatchChannelEvent
|
||||
from helpers import packetHelper
|
||||
from objects import glob
|
||||
from common.sentry import sentry
|
||||
|
||||
|
||||
class handler(requestsManager.asyncRequestHandler):
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
@sentry.captureTornado
|
||||
def asyncPost(self):
|
||||
#try:
|
||||
# Track time if needed
|
||||
if glob.outputRequestTime:
|
||||
# Start time
|
||||
@@ -238,12 +239,6 @@ class handler(requestsManager.asyncRequestHandler):
|
||||
self.add_header("Connection", "keep-alive")
|
||||
self.add_header("Keep-Alive", "timeout=5, max=100")
|
||||
self.add_header("Content-Type", "text/html; charset=UTF-8")
|
||||
#except:
|
||||
# log.error("Unknown error!\n```\n{}\n{}```".format(sys.exc_info(), traceback.format_exc()))
|
||||
# if glob.sentry:
|
||||
# yield tornado.gen.Task(self.captureException, exc_info=True)
|
||||
#finally:
|
||||
# self.finish()
|
||||
|
||||
@tornado.web.asynchronous
|
||||
@tornado.gen.engine
|
||||
|
Reference in New Issue
Block a user