Skip to content

Commit

Permalink
Adjust the canary not to crash if it cannot poll the metric alarms (#279
Browse files Browse the repository at this point in the history
)

Adjust the canary not to crash if it cannot poll the metric alarms. Improve exception printing.
  • Loading branch information
TwistedTwigleg authored May 1, 2023
1 parent 9b9eb47 commit e6ea3cc
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 35 deletions.
2 changes: 1 addition & 1 deletion codebuild/CanaryWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def application_thread():
finished_email_body += "Failure due to unknown reason! This shouldn't happen and means something has gone wrong!"
except Exception as e:
print ("ERROR: Could not (possibly) cut ticket due to exception!")
print ("Exception: " + str(e), flush=True)
print (f"Exception: {repr(e)}", flush=True)

# Clean everything up and stop
snapshot_monitor.cleanup_monitor(error_occurred=wrapper_error_occurred)
Expand Down
2 changes: 1 addition & 1 deletion codebuild/CanaryWrapper_24_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def application_thread():
finished_email_body += "Failure due to unknown reason! This shouldn't happen and means something has gone wrong!"
except Exception as e:
print ("ERROR: Could not (possibly) cut ticket due to exception!")
print ("Exception: " + str(e), flush=True)
print (f"Exception: {repr(e)}", flush=True)

# Clean everything up and stop
snapshot_monitor.cleanup_monitor(error_occurred=wrapper_error_occurred)
Expand Down
Loading

0 comments on commit e6ea3cc

Please sign in to comment.