title: Detect whether Celery is Available/Running
body: <p>I'm using <a href="http://celeryproject.org/" rel="noreferrer">Celery</a> to manage asynchronous tasks. Occasionally, however, the celery process goes down which causes none of the tasks to get executed. I would like to be able to check the status of celery and make sure everything is working fine, and if I detect any problems display an error message to the user. From the Celery Worker documentation it looks like I might be able to use <a href="http://ask.github.com/celery/userguide/workers.html#ping" rel="noreferrer">ping</a> or <a href="http://ask.github.com/celery/userguide/workers.html#inspecting-workers" rel="noreferrer">inspect</a> for this, but ping feels hacky and it's not clear exactly how inspect is meant to be used (if inspect().registered() is empty?).</p>
  
  <p>Any guidance on this would be appreciated. Basically what I'm looking for is a method like so:</p>
  
  <pre><code>def celery_is_alive():
      from celery.task.control import inspect
      return bool(inspect().registered()) # is this right??
  </code></pre>
  
  <p>EDIT: It doesn't even look like registered() is available on celery 2.3.3 (even though the 2.1 docs list it). Maybe ping is the right answer.</p>
  
  <p>EDIT: Ping also doesn't appear to do what I thought it would do, so still not sure the answer here.</p>