mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Trying to find root cause of issue
This commit is contained in:
parent
a0b9cb3c1e
commit
5011659b1d
|
@ -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)
|
||||
|
|
20
src/misc.py
20
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
|
||||
|
|
Loading…
Reference in a new issue