title: Celery + RabbitMQ Results Backend + WebSockets?
body: <p>I have a Flask web app and there are some tasks that are long running (> 1 minute).  I would like to offload these from flask (blocking web server, etc) and move them into external tasks.  I got Celery setup and am able to run these tasks from Flask.  Good.</p>
  
  <p>To notify users when the task is done and return the results, I wanted to use web sockets.  This is where it gets hard.</p>
  
  <p>I have a gevent websocket server running that my client connects to.  When I launch the celery task I pass in the session ID of the client so that when I get my results I know who they belong to.</p>
  
  <p>Now I need the websocket server to know when these tasks are done, look at the results, and send them to the appropriate connection.</p>
  
  <p>How?  This is where I get completely lost.  I can listen for celery events with <code>celery.events.EventListener.capture</code>, but this blocks my websocket server so I can't have multiple connections!</p>
  
  <p>How can I listen for celery events without blocking?</p>
  
  <p>One idea is to make the request over the web socket and then launch the celery task from my websocket server.  That would solve the notification issue (just used celery events), but I'm still curious about my original question where the request was made to my standard flask server.</p>