Use header to expose healthcheck status instead of status code
All checks were successful
Ruff / ruff (push) Successful in 1m14s
Test / test (push) Successful in 4m57s

This is mostly to prevent it sending me emails on every GET of the
page when erroring
This commit is contained in:
Adam Goldsmith 2024-08-29 21:35:12 -04:00
parent e4c6fab011
commit 0e486babb7

View File

@ -88,5 +88,5 @@ def healthcheck(request: HttpRequest):
return HttpResponse(
("OK: " if all_ok else "CRITICAL: ") + "\n".join(messages),
content_type="text/plain",
status=200 if all_ok else 500,
headers={"X-CMSManage-Status": "OK"},
)