Best way to do background calculations?

Chris Angelico rosuav at gmail.com
Mon Oct 26 13:07:05 EDT 2015


On Tue, Oct 27, 2015 at 4:01 AM, Israel Brewster <israel at ravnalaska.net> wrote:
> Sounds similar to MRAB's suggestion of starting the process before any sockets have been opened. Certainly worth investigating, and I think it should be doable. Thanks!

Yep, either would work. My suggestion would be to not fork off from
your main web server process _at all_, and have your background
process managed some other way (eg a systemd service or Upstart job),
but forking earlier will have a similar effect.

ChrisA



More information about the Python-list mailing list