[Twisted-Python] supporting start/stop/restart behavior

Clark C. Evans cce at clarkevans.com
Fri Mar 21 17:41:34 EST 2003

On Fri, Mar 21, 2003 at 12:58:51PM -0800, Donovan Preston wrote:
| One big question is what happens when you do a restart; does it stop 
| the server and then start it with the original tap, or with the 
| -shutdown.tap?
| I vote for it restarting the -shutdown.tap, but there are plenty of 
| reasons not to do this, too.

I don't have an opinion, other than pointing out that if 
--no_save is used, then there won't be a -shutdown.tap 
and therefore, this sort of feature would be disabled.   

Proposed implementation:

  Suppose that xxx.tap was the initial application file
  and that it was started with twistd -f xxx.tap; on 
  shutdown this would create a xxx-shutdown.tap

  Then, the 'restart' command would do the following:

    1) if a xxx-initial.tap file isn't there, it 
       should copy xxx.tap to xxx-initial.tap

    2) if a xxx-shutdown.tap file exists, it should
       copy xxx-shutdown.tap to xxx.tap

    3) it should then follow the same process
       as 'start'

On a related topic, I would very much like --python
to imply --no_save ; if someone wants to use taps then
they should write their app.py file to use app.save
functionality to make a .tap file.   It is those people
who arn't using '.tap' saved state files that, in most
cases, will be using the --python option.



More information about the Twisted-Python mailing list