[Twisted-Python] -shutdown taps

Ian Duggan ian at ianduggan.net
Thu Jun 16 13:04:06 EDT 2005


On Thursday 09 June 2005 15:56, Michael Twomey wrote:
> 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

Ok, so it sounds like I did understand the issues. I mostly want this for 
surviving quick upgrades. The connection info stored is useless if it's more 
than a minute old or so, and it's not the end of the world it it gets tossed.

I actually want it to blow things away and start over in some cases. I'll have 
my startup script look for -shutdown first, and otherwise start normally. 
I'll probably throw in a flag to force it either way as well.

Maybe a feature to prevent overwriting the old -shutdown unless the 
application was loaded from it would be a useful feature? I.e., force it to 
create a differently named -shutdown if so configured, and maybe log 
warnings?

> 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
> there.

Thanks, this will probably be stage2.

--Ian





More information about the Twisted-Python mailing list