Merge "Make forever_retry_uncaught_exceptions handle its own failures"
This commit is contained in:
commit
9ec6cccb77
@ -204,6 +204,7 @@ def forever_retry_uncaught_exceptions(infunc):
|
||||
try:
|
||||
return infunc(*args, **kwargs)
|
||||
except Exception as exc:
|
||||
try:
|
||||
this_exc_message = six.u(str(exc))
|
||||
if this_exc_message == last_exc_message:
|
||||
exc_count += 1
|
||||
@ -223,4 +224,14 @@ def forever_retry_uncaught_exceptions(infunc):
|
||||
# This should be a very rare event. In case it isn't, do
|
||||
# a sleep.
|
||||
time.sleep(1)
|
||||
except Exception:
|
||||
try:
|
||||
logging.exception(
|
||||
_LE('Unexpected error occurred while '
|
||||
'processing Exception'))
|
||||
except Exception:
|
||||
# In case either serialization of the last exception
|
||||
# or logging failed, ignore the error
|
||||
pass
|
||||
|
||||
return inner_func
|
||||
|
Loading…
x
Reference in New Issue
Block a user