Quantcast
Channel: Active questions tagged heroku - Webmasters Stack Exchange
Viewing all articles
Browse latest Browse all 46

How to compute a solution in the background after the page has been sent using Heroku?

$
0
0

We have a web application in which the user enters the input to some computational problem, sends it to a server, and the server calculates and returns the result. For some inputs, the calculation takes a long time, so the server returns a page saying "I am working on it", and continues working on it in a background thread. When the solution is ready, the thread sends an email to the user.

This worked well on a Linux server, but when we moved it to Heroku, it stopped working - we found out that, when the server returns a reply to the user, Heroku stops all threads, including the computation thread.

What is the correct way to implement this scheme in Heroku?


Viewing all articles
Browse latest Browse all 46

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>