From 5011659b1d2a9ac5a9cd53a7414a98fd91fcc169 Mon Sep 17 00:00:00 2001 From: Frisk Date: Fri, 6 Sep 2024 19:41:12 +0200 Subject: [PATCH] Trying to find root cause of issue --- src/domain.py | 2 ++ src/misc.py | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/domain.py b/src/domain.py index 7dfe461..a2fb0c7 100644 --- a/src/domain.py +++ b/src/domain.py @@ -192,6 +192,7 @@ class Domain: if not (time.time()-172800 > self.last_failure_report): # If we haven't reported for more than 2 days or at all return traceback.print_exc() + logger.exception(sys.exc_info()) wikis = self.failure_rate_investigation() if wikis: await self.send_exception_to_monitoring(e, wikis) @@ -210,6 +211,7 @@ class Domain: if not (time.time()-172800 > self.last_failure_report): # If we haven't reported for more than 2 days or at all return traceback.print_exc() + logger.exception(sys.exc_info()) wikis = self.failure_rate_investigation() if wikis: await self.send_exception_to_monitoring(e, wikis) diff --git a/src/misc.py b/src/misc.py index dc22e89..ed06170 100644 --- a/src/misc.py +++ b/src/misc.py @@ -251,13 +251,13 @@ class LimitedList(list): return "\n".join([str(x) for x in self]) -def catch_exceptions(passed_context): - def wrapper(func): - @functools.wraps(func) - async def wrapped(*args, **kwargs): - try: - return await func(*args, **kwargs) - except Exception as e: - - return wrapped - return wrapper +# def catch_exceptions(passed_context): +# def wrapper(func): +# @functools.wraps(func) +# async def wrapped(*args, **kwargs): +# try: +# return await func(*args, **kwargs) +# except Exception as e: +# +# return wrapped +# return wrapper