Since switching the db code to use an eventlet library, we can no longer re-raise exceptions if there is any db access in the exception handler. There are a number of places in the code where this is done.
we need to change instances of
except <SomeException>:
# code that uses db or rpc
raise
to:
except <SomeException>:
exc = sys.exc_info()
# code that uses db or rpc
raise exc
Also adding a logging.exception('useful message') is probably a good idea in most cases if the original traceback is important.
Since switching the db code to use an eventlet library, we can no longer re-raise exceptions if there is any db access in the exception handler. There are a number of places in the code where this is done.
we need to change instances of
except <SomeException>:
# code that uses db or rpc
raise
to:
except <SomeException>:
exc = sys.exc_info()
# code that uses db or rpc
raise exc
Also adding a logging. exception( 'useful message') is probably a good idea in most cases if the original traceback is important.