mysociety / citizenconnect

Citizen Connect project for the NHS: reporting problems, leaving reviews
https://www.nhs.uk/careconnect/choices
Other
1 stars 0 forks source link

Add a HealthCheck page and some checks for basic application health #1294

Closed stevenday closed 10 years ago

stevenday commented 10 years ago

This PR adds a new view which does a variety of checks against the database to make sure that either asyncronous tasks like cron jobs have run or that some user interaction has happened within a set time. The tests it does so far are:

I'm open to suggestions as to whether this is better as a view or a managment command, because if it's the former, I guess it'll need some authentication to protect it. @flupsy - any preferences?

Equally, do these all seem reasonable things to check and reasonable boundaries for normal behaviour?

stevenday commented 10 years ago

@davea - since you're a djangonaut too, would you mind taking a look at this at some point and commenting on general sanity?

davea commented 10 years ago

General sanity level: high. The only suggestion I have is to perhaps add a test that ensures the health check returns 200 when there are Problems in the DB as well as when there aren't.

Otherwise, looks good to me :+1:.