Commit a1ac8208 authored by echel0n's avatar echel0n
Browse files

added loggers to be ignored by Sentry

fixed `There is no current event loop in thread` exception when web options handler called
parent f892c888
......@@ -41,7 +41,7 @@ from apscheduler.schedulers.tornado import TornadoScheduler
from apscheduler.triggers.interval import IntervalTrigger
from dateutil import tz
from fake_useragent import UserAgent
from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.logging import LoggingIntegration, ignore_logger
from tornado.ioloop import IOLoop, PeriodicCallback
import sickrage
......@@ -601,6 +601,23 @@ class Core(object):
for tag_key, tag_value in sentry_tags.items():
sentry_sdk.set_tag(tag_key, tag_value)
# set loggers to ignore
ignored_loggers = [
'enzyme.parsers.ebml.core',
'subliminal.core',
'subliminal.utils',
'subliminal.refiners.metadata',
'subliminal.providers.tvsubtitles',
'pika.connection',
'pika.adapters.base_connection',
'pika.adapters.utils.io_services_utils',
'pika.adapters.utils.connection_workflow',
'pika.adapters.utils.selector_ioloop_adapter'
]
for item in ignored_loggers:
ignore_logger(item)
def server_checkup(self):
if self.config.general.server_id:
server_status = self.api.server.get_status(self.config.general.server_id)
......
......@@ -161,7 +161,7 @@ class APIBaseHandler(RequestHandler):
self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
def options(self, *args, **kwargs):
self.finish(self._no_content())
self._no_content()
def json_response(self, data=None, error=None, status=200):
self.set_header('Content-Type', 'application/json')
......
......@@ -204,7 +204,6 @@ class BaseHandler(RequestHandler):
def options(self, *args, **kwargs):
self.set_status(204)
self.finish()
def get_argument(self, *args, **kwargs):
value = super(BaseHandler, self).get_argument(*args, **kwargs)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment