[Twisted-Python] Graceful shutdown

Aaron Gallagher _ at habnab.it
Wed Aug 28 10:09:43 MDT 2013

I didn't read over your code, but this is something that I've
independently implemented. You can see my implementation at
<https://github.com/habnabit/polecat/blob/master/polecat.py>. The Site
subclass does some other monitoring-related things, but you should be
able to tease out just the graceful shutdown parts if that's all you

Polecat needs some work and a lot of documentation, but for now, the way
to do a graceful shutdown is to make a PolecatSite and then
addSystemEventTrigger('before', 'shutdown',

More information about the Twisted-Python mailing list