Skip to content

Commit

Permalink
close opened db during shutdown (#740)
Browse files Browse the repository at this point in the history
* close opened db during shutdown

* refs

* sort import
  • Loading branch information
mamico authored and dataflake committed Nov 29, 2019
1 parent 6a9d18d commit 9f297ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst
5.0a1 (unreleased)
------------------

- Close opened db during shutdown (as ZServer is already doing).
(`#740 <https://github.com/zopefoundation/Zope/issues/740>`_)

- Updated Zope documentation sources for Zope 5
(`#659 <https://github.com/zopefoundation/Zope/issues/659>`_)

Expand Down
3 changes: 3 additions & 0 deletions src/Zope2/Startup/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from paste.deploy import loadserver
from six.moves import configparser

import Zope2
from App.config import getConfiguration


Expand Down Expand Up @@ -209,6 +210,8 @@ def serve():
msg = ''
self.out('Exiting%s (-v to see traceback)' % msg)
finally:
for db in Zope2.opened:
db.close()
self.unlinkPidFile()

serve()
Expand Down

0 comments on commit 9f297ef

Please sign in to comment.