[Zope] how do I manage a graceful shutdown?
Toby Dickenson
tdickenson@geminidataloggers.com
Thu, 20 Feb 2003 10:12:04 +0000
On Thursday 20 February 2003 7:52 am, Jamie Heilman wrote:
> Magnus Heino wrote:
> > > Is there a "hook" that I can include in my product to make sure my
> > > shutdown stuff is called whenever Zope is shutting down or restarting?
> >
> > Zope/lib/python/Signals/Signals.py
>
> Signal handlers won't be called during a shutdown from the ZMI.
> There is http://dev.zope.org/Wikis/DevSite/Proposals/CleanShutdown
> which is supposedly in CVS and has been vetted, but its not in 2.6.1,
It is in the trunk for 2.7, and it is in a branch that merges cleanly with
2.6.x. The change is too deep for the maintenance branch.
> and I guess, even if it was, it doesn't look like it offers much in the
> way of hooks for products to play with.
Read the code. It allows medusa-registered sockets to manage the shutdown
process.
http://cvs.zope.org/Zope/lib/python/Lifetime.py?only_with_tag=toby-clean-shutdown-branch
--
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson