Skip to content

Instantly share code, notes, and snippets.

@glennzw
Last active December 15, 2015 19:09
Show Gist options
  • Save glennzw/5308888 to your computer and use it in GitHub Desktop.
Save glennzw/5308888 to your computer and use it in GitHub Desktop.
Hardened python
restarting the *program* on unknown exception is probably a better start
this would typically be implemented/configured by your init system
in upstart, it's just a matter of adding "respawn" to the config file
(there's options for saying how many times to try, with what sort of delay, etc)
systemd will have something as well
with an old-style shell-script based system, you'd probably want to look into the help "start-stop-daemon", which again has options for this sort of thing
Also:
http://supervisord.org/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment