[Twisted-Python] -shutdown taps

Michael Twomey micktwomey at gmail.com
Thu Jun 9 18:56:27 EDT 2005


The biggest thing which will kill the data is running the original tap
again, not the -shutdown one. Running the original tap will overwrite
the old shutdown one with a fresh instance. Since this can happen
easily (e.g. at critical oh-my-god-the-server-is-broken moments), you
really can't rely on the data being there. It's good for caching or
anything you don't mind losing, but you have to use conditional logic
in your startup script to figure out which tap to start with.

After experimenting with it and losing my data repeatedly I just wrote
the data I was interested in to a pickle. Since you have the
stopService hook in services, you can whack the persistence stuff in


On 6/8/05, Ian Duggan <ian at ianduggan.net> wrote:
> Yeah? My daemon keeps a small amount of state for "in process" requests
> related to long running background processes. I was hoping to have the daemon
> save the hash it was using, and restart the processes where they were when it
> restarted.
> What about this method makes it fragile? I guess that's what I was hoping to
> code into a more robust state. It's a cool feature, IMHO, to have automagical
> daemon persistence.
> --Ian

More information about the Twisted-Python mailing list