daemonocle icon indicating copy to clipboard operation
daemonocle copied to clipboard

Add more examples

Open grimnight opened this issue 10 years ago • 0 comments

Create examples folder with runnable scripts, the ones from the documentation. Please add more usage examples.

Such as:

  • Using threading and how-to cleanly and safely stop the program.
  • Using multiprosessing and how-to cleanly and safely stop the program.
  • How-to handle file reloading with Flask and how-to cleanly and safely stop the program.
  • WSGI: such as gunicorn (functionality like gunicorn myapp:app but with daemonizing) or wsgiref (using any WSGI server).
  • Show an example with setproctitle.
  • Show how-to stop the daemon from inside the worker function.

I ask about these examples mainly because I do not know how-to cleanly and safely stop a threaded server that uses serve_forever. How do you send a stop signal to such a server? How do you do it safely and with predictable results?

grimnight avatar Feb 18 '15 20:02 grimnight