Skip to content

Commit

Permalink
Add debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
emileswarts committed Feb 18, 2025
1 parent 5a5a2f5 commit 79e639f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions trade_remedies_api/core/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ def application_service_health():
response_times = []

for service_check in services:
# try:
_, response_time = service_check()
print(response_time)
response_times.append(response_time)
# except Exception as err:
# sentry_sdk.capture_exception(err)
# return _pingdom_custom_status_html_wrapper(f"Error: {str(err)}", 0)
try:
_, response_time = service_check()
print(response_time)
response_times.append(response_time)
except Exception as err:
sentry_sdk.capture_exception(err)
print("here is the error: ", str(err))
return _pingdom_custom_status_html_wrapper(f"Error: {str(err)}", 0)

avg_response_time = sum(response_times) / len(response_times)
return _pingdom_custom_status_html_wrapper("OK", avg_response_time)

0 comments on commit 79e639f

Please sign in to comment.