Skip to content

Commit

Permalink
put formatted exception in a variable in case of a heartbeat error
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Mar 7, 2018
1 parent 0e6a5f6 commit 96b5858
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kuyruk/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ def _handle_sighup(self, signum, frame):
"""
logger.warning("Catched SIGHUP")
raise HeartbeatError(self._heartbeat_exc_info)
exc_info = self._heartbeat_exc_info
self._heartbeat_exc_info = None
# Format exception info to see in tools like Sentry.
formatted_exception = ''.join(traceback.format_exception(*exc_info)) # noqa
raise HeartbeatError(exc_info)

@staticmethod
def _handle_sigusr1(signum, frame):
Expand Down

0 comments on commit 96b5858

Please sign in to comment.