Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Make daemonize() Functionality Available to All Commands
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dave Mankoff  
View profile  
 More options Oct 31 2012, 6:50 pm
From: Dave Mankoff <man...@gmail.com>
Date: Wed, 31 Oct 2012 15:50:47 -0700 (PDT)
Local: Wed, Oct 31 2012 6:50 pm
Subject: Make daemonize() Functionality Available to All Commands

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris McDonough  
View profile  
 More options Oct 31 2012, 6:57 pm
From: Chris McDonough <chr...@plope.com>
Date: Wed, 31 Oct 2012 18:57:39 -0400
Local: Wed, Oct 31 2012 6:57 pm
Subject: Re: Make daemonize() Functionality Available to All Commands
On 10/31/2012 06:50 PM, Dave Mankoff wrote:

Use supervisor instead:  http://supervisord.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »