Let me first say that pyramid has made writing cli scripts a breeze with 
pyramid.paster.bootstrap(). I love it!

I am looking to turn some of my scripts into daemon processes. I went to 
look at how pserve does this, and I noticed that it is not a trivial piece 
of code. It seems to me that it would be incredibly useful to add a 
daemonize function that mimics (and slightly builds upon) the behavior seen 
in pserve so as to make it easy to developers.

I am imagining an interface that looks something like:

daemonize(<start|stop|restart|reload|status>, pid_file_location)

or, more cleanly(?)

daemon_start(pid_file_location)
daemon_stop(pid_file_location)
daemon_restart(pid_file_location)
daemon_reload(pid_file_location)
daemon_status(pid_file_location)

Potential additional enhancements would be to specify the signals used for 
stop, restart, and reload. I think that these can exist as standalone 
functions, or, alternatively, it would be easy enough to make a callable 
DaemonCommand base class. Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pylons-devel/-/HmawT-ZMVK4J.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to