title: Updating client that a celery task has finished
body: <p>I have the following requirement. I am creating a web app (no frontend) that will receive post and get requests. It's functionality will be the following. Client will make a post on a URL triggering a large and time expensive task. A Client will also have the ability to make a Get request and retrieve the results of the taks. </p>
  
  <p>I was thinking of using Celery to start the task. The task is a very large arithmetic computation. My problem is on how to notify the client that the task he triggered has finished and he can retrieve the result.</p>
  
  <p>So I was thinking it like this:</p>
  
  <pre><code>client -&gt;posts to web app -&gt; web app starts task to celery -&gt; request closed
  
  web app notifies -&gt; client triggered task  # what is the proper way
  
  client -&gt; get request to web app -&gt; web app returns result
  </code></pre>
  
  <p>I know there isn't one proper way, so I' ll be a bit more specific. For the time being the task will be triggered by another flask application, automatically. Is there a way the flask application to be automatically notified that the task is finished and get the results and store them in its own database? And a second question what would be the most generic solution that would work even if the client is a flask app, an android app an IOS app etc. </p>
  
  <p>The reason I also ask is because I had a debate on whether an api post the results back to the client or the client should be responsible to check and get the results.</p>