[Zope] how do I manage a graceful shutdown?
Dieter Maurer
dieter@handshake.de
Wed, 19 Feb 2003 20:51:07 +0100
Tim Lynch wrote at 2003-2-18 14:35 EST:
> I want to do a graceful shutdown with a Product I'm writing. That is, I want to
> guarantee that some log files include a final message, maybe send an email to
> a site admin ... those sorts of things.
>
> 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?
The Python module "atexit" might help you...
It might be a bit late when the exit handler is called.
You will need to reopen a ZODB connection when you need to access
Zope objects.
Dieter