![](https://secure.gravatar.com/avatar/15fa47f2847592672210af8a25cd1f34.jpg?s=120&d=mm&r=g)
31 Jul
2004
31 Jul
'04
10:48 p.m.
On Jul 31, 2004, at 11:13 AM, Sergio Trejo wrote:
When a Twisted web server is killed, I'd like to somehow get a signal from the server that its going down and clean up some objects (I.e., a PB Client instance -- need to log it out of the PB Server on shutdown) that I've persisted in the web server's registry. Has anyone done this before? Any suggestions besides perhaps usng the shutdown script to instantiate an HTTP client which fires a URL to the server which acts as a trigger to handle the registry cleanup?
reactor.addSystemEventTrigger('before', 'shutdown', yourfunction)