From 288cc09cc143c7d0791178d3fd333433a95fa416 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 26 Mar 2024 19:29:46 +0000 Subject: Move sentry initialisation to after the event loop is created This is required for the sentry asyncio integration --- bot/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/__main__.py b/bot/__main__.py index ddb6ed608..42b3c0c95 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -13,7 +13,6 @@ from bot import constants from bot.bot import Bot from bot.log import get_logger, setup_sentry -setup_sentry() LOCALHOST = "127.0.0.1" @@ -36,6 +35,8 @@ async def _create_redis_session() -> RedisSession: async def main() -> None: """Entry async method for starting the bot.""" + setup_sentry() + statsd_url = constants.Stats.statsd_host if constants.DEBUG_MODE: # Since statsd is UDP, there are no errors for sending to a down port. -- cgit v1.2.3