Adam Groszer wrote:
What do you say, can there be any data loss if I use the Shutdown
button? Does Zope write everything out to disc before it quits?
Zope (or rather ZODB FileStorage) writes all transactions to disk when
they are committed. (Baring extraordinary bugs) any committed
transaction cannot be corrupted.
It didn't look to me like there's any code in Zope3 now supporting
controlled ("graceful") shutdown, although this is the first time I
looked at Zope3's shutdown code and may have missed something.
There's elaborate (probably _overly_ elaborate) code in Zope2 trying
to do controlled shutdown.
To clarify here, there is no danger of losing/corrupting already
committed transactions in ZODB. Any current transactions will simple be
uncommitted. If you want to programmatically tell Zope to stop you can
use code like this:
from zope.app import zapi
from zope.app.applicationcontrol.interfaces import IServerControl
control = zapi.getUtility(IServerControl)
Or, a better question: how to stop Zope3 cleanly (and when possible
quickly, for development sessions)?
Sorry, no idea here. Anyone else?
As I said above, there is no danger of corrupting data in a "stock"
There *is* the possibility of having on-going interactions with external
systems that need some sort of shutdown (eg. relational databases, etc).
In that case I would recommend the Python standard library module
In summary: It might be nice if Z3 closed file handles and waited for
outstanding requests to be handled, but the current shutdown story is
Senior Software Engineer
Zope3-dev mailing list