mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 22:47:04 +01:00
Remove sentry for now
This commit is contained in:
parent
4f27dedd6f
commit
0f60152e63
@ -4,8 +4,8 @@ from titanembeds.commands import Commands
|
|||||||
from titanembeds.socketio import SocketIOInterface
|
from titanembeds.socketio import SocketIOInterface
|
||||||
from titanembeds.poststats import DiscordBotsOrg, BotsDiscordPw
|
from titanembeds.poststats import DiscordBotsOrg, BotsDiscordPw
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from raven import Client as RavenClient
|
# from raven import Client as RavenClient
|
||||||
import raven
|
# import raven
|
||||||
import discord
|
import discord
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import asyncio
|
import asyncio
|
||||||
@ -16,10 +16,10 @@ logging.basicConfig(filename='titanbot.log',level=logging.INFO,format='%(asctime
|
|||||||
handler = logging.FileHandler(config.get("logging-location", "titanbot.log"))
|
handler = logging.FileHandler(config.get("logging-location", "titanbot.log"))
|
||||||
logging.getLogger('TitanBot')
|
logging.getLogger('TitanBot')
|
||||||
logging.getLogger('sqlalchemy')
|
logging.getLogger('sqlalchemy')
|
||||||
try:
|
# try:
|
||||||
raven_client = RavenClient(config["sentry-dsn"])
|
# raven_client = RavenClient(config["sentry-dsn"])
|
||||||
except raven.exceptions.InvalidDsn:
|
# except raven.exceptions.InvalidDsn:
|
||||||
pass
|
# pass
|
||||||
|
|
||||||
class Titan(discord.AutoShardedClient):
|
class Titan(discord.AutoShardedClient):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -14,7 +14,7 @@ except:
|
|||||||
from .database import db
|
from .database import db
|
||||||
from flask import Flask, render_template, request, session, url_for, redirect, jsonify, g
|
from flask import Flask, render_template, request, session, url_for, redirect, jsonify, g
|
||||||
from flask_sslify import SSLify
|
from flask_sslify import SSLify
|
||||||
from titanembeds.utils import rate_limiter, discord_api, socketio, babel, redis_store, language_code_list, sentry
|
from titanembeds.utils import rate_limiter, discord_api, socketio, babel, redis_store, language_code_list#, sentry
|
||||||
from .blueprints import api, user, admin, embed, gateway
|
from .blueprints import api, user, admin, embed, gateway
|
||||||
import os
|
import os
|
||||||
from titanembeds.database import get_administrators_list
|
from titanembeds.database import get_administrators_list
|
||||||
@ -35,7 +35,7 @@ app.config['REDIS_URL'] = config["redis-uri"]
|
|||||||
app.config['MAX_CONTENT_LENGTH'] = 4 * 1024 * 1024 # Limit upload size to 4mb
|
app.config['MAX_CONTENT_LENGTH'] = 4 * 1024 * 1024 # Limit upload size to 4mb
|
||||||
app.secret_key = config['app-secret']
|
app.secret_key = config['app-secret']
|
||||||
|
|
||||||
sentry.init_app(app)
|
#sentry.init_app(app)
|
||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
rate_limiter.init_app(app)
|
rate_limiter.init_app(app)
|
||||||
if config.get("enable-ssl", False):
|
if config.get("enable-ssl", False):
|
||||||
@ -95,9 +95,9 @@ def context_processor():
|
|||||||
"dbl_voted": session.get("unauthenticated", True) == False and bool(redis_store.get("DiscordBotsOrgVoted/" + str(session.get("user_id", -1))))
|
"dbl_voted": session.get("unauthenticated", True) == False and bool(redis_store.get("DiscordBotsOrgVoted/" + str(session.get("user_id", -1))))
|
||||||
}
|
}
|
||||||
|
|
||||||
@app.errorhandler(500)
|
# @app.errorhandler(500)
|
||||||
def internal_server_error(error):
|
# def internal_server_error(error):
|
||||||
return render_template('500.html.j2',
|
# return render_template('500.html.j2',
|
||||||
event_id=g.sentry_event_id,
|
# event_id=g.sentry_event_id,
|
||||||
public_dsn=sentry.client.get_public_dsn('https')
|
# public_dsn=sentry.client.get_public_dsn('https')
|
||||||
), 500
|
# ), 500
|
@ -7,7 +7,7 @@ from flask_babel import Babel
|
|||||||
from flask_redis import FlaskRedis
|
from flask_redis import FlaskRedis
|
||||||
from config import config
|
from config import config
|
||||||
from sqlalchemy import and_
|
from sqlalchemy import and_
|
||||||
from raven.contrib.flask import Sentry
|
#from raven.contrib.flask import Sentry
|
||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
import hashlib
|
import hashlib
|
||||||
@ -370,7 +370,7 @@ def is_int(specimen):
|
|||||||
rate_limiter = Limiter(key_func=get_client_ipaddr) # Default limit by ip address
|
rate_limiter = Limiter(key_func=get_client_ipaddr) # Default limit by ip address
|
||||||
socketio = SocketIO(engineio_logger=config.get("engineio-logging", False))
|
socketio = SocketIO(engineio_logger=config.get("engineio-logging", False))
|
||||||
babel = Babel()
|
babel = Babel()
|
||||||
sentry = Sentry(dsn=config.get("sentry-dsn", None))
|
#sentry = Sentry(dsn=config.get("sentry-dsn", None))
|
||||||
|
|
||||||
@socketio.on_error_default # disconnect on all errors
|
@socketio.on_error_default # disconnect on all errors
|
||||||
def default_socketio_error_handler(e):
|
def default_socketio_error_handler(e):
|
||||||
|
Loading…
Reference in New Issue
Block a user