Trying to find root cause of issue

This commit is contained in:
Frisk 2024-09-06 19:41:12 +02:00
parent a0b9cb3c1e
commit 5011659b1d
2 changed files with 12 additions and 10 deletions

View file

@ -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 if not (time.time()-172800 > self.last_failure_report): # If we haven't reported for more than 2 days or at all
return return
traceback.print_exc() traceback.print_exc()
logger.exception(sys.exc_info())
wikis = self.failure_rate_investigation() wikis = self.failure_rate_investigation()
if wikis: if wikis:
await self.send_exception_to_monitoring(e, 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 if not (time.time()-172800 > self.last_failure_report): # If we haven't reported for more than 2 days or at all
return return
traceback.print_exc() traceback.print_exc()
logger.exception(sys.exc_info())
wikis = self.failure_rate_investigation() wikis = self.failure_rate_investigation()
if wikis: if wikis:
await self.send_exception_to_monitoring(e, wikis) await self.send_exception_to_monitoring(e, wikis)

View file

@ -251,13 +251,13 @@ class LimitedList(list):
return "\n".join([str(x) for x in self]) return "\n".join([str(x) for x in self])
def catch_exceptions(passed_context): # def catch_exceptions(passed_context):
def wrapper(func): # def wrapper(func):
@functools.wraps(func) # @functools.wraps(func)
async def wrapped(*args, **kwargs): # async def wrapped(*args, **kwargs):
try: # try:
return await func(*args, **kwargs) # return await func(*args, **kwargs)
except Exception as e: # except Exception as e:
#
return wrapped # return wrapped
return wrapper # return wrapper