title: Celery Flower as Daemon
body: <p>Im running celery with a redis backend.
  I want to run celery flower as a daemon on centos 6.2.</p>
  
  <p>I understand flower is a Tornado application , so I should use a process to run a tornado application as a deamon.</p>
  
  <p>Normally to start flower I use this command:</p>
  
  <blockquote>
    <p>celery flower --broker=redis://localhost</p>
  </blockquote>
  
  <p>I read at the below link that I need to create a python script as such:
  <a href="http://www.charleshooper.net/blog/python-starting-tornado-apps-at-boot-using-upstart/">http://www.charleshooper.net/blog/python-starting-tornado-apps-at-boot-using-upstart/</a>
  (Startflower.py)</p>
  
  <pre><code>import tornado.ioloop
  import tornado.web
  import tornado.httpserver 
  
  if __name__ == "__main__":
      http_server = tornado.httpserver.HTTPServer(application)
      http_server.listen(port)
      tornado.ioloop.IOLoop.instance().start()
  </code></pre>
  
  <p>However, I am unsure what to put in the 'application' variable. I tried 'celery flower --broker=redis://localhost' and 'celery flower" but neither worked</p>
  
  <p>What do i need to do to get it working as a daemon??</p>