toastdriven/django-haystack — pull request #941 by benoitbryon (2014-02-07 11:00:26+00:00)
Title: Introducing smoketests

This pull-request is both a question and a proposal.

**Q: how can I check the status of backends (third-party services) from the Django project point of view?**

As an example, once I deployed my Django project, I want to check that connections configured in HAYSTACK_CONNECTIONS are ok. If some ElasticSearch server is down, if ElasticSearch server is not reachable (network issue), if there is a typo in port configuration... I expect errors.
Later, I want to plug those checks in some monitoring tool.

I haven't figured out how to perform such checks with haystack.

So **here is a pull-request, where I'm proposing a work-in-progress implementation.**
Basically, I added a `smoketest()` method in base backend, and a `healthchecks` module which uses those `smoketest()` methods.
`smoketest()` method has not been implemented yet in backends (I would appreciate help because I do not know much about backends). But I guess you get the idea, and can tell me whether I should continue the development of such a feature or not.

Note: I'm also working on [hospital] (http://hospital.readthedocs.org) project, which is a healthcheck/smoketest framework for Python. I haven't introduced a dependency to hospital in the current pull-request. It can be done as a second step, if you like it.