Skip to content

Commit

Permalink
Merge branch 'master' into update-zodbpy2topy3-migratio-guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 10, 2019
2 parents 8987a6c + 0f0bc78 commit cdc6a9b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ Other changes

- Update ZODB migration documentation.

- Changed the WSGI configuration template so those annoying waitress queue
messages only go into the event log, but not onto the console.

- Change naming for the generated WSGI configurations to ``zope.conf`` and
``zope.ini`` to match existing documentation for Zope configurations.
(`#571 <https://github.com/zopefoundation/Zope/issues/571>`_)
Expand Down
28 changes: 10 additions & 18 deletions docs/zdgbook/ObjectPublishing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1017,26 +1017,18 @@ When Zope receives a request it begins a transaction. Then it begins
the process of traversal. Zope automatically commits the transaction
after the published object is found and called. So normally each web
request constitutes one transaction which Zope takes care of for you.
See Chapter 4. for more information on transactions.

If an unhandled exception is raised during the publishing process,
Zope aborts the transaction. As detailed in Chapter
4. Zope handles 'ConflictErrors' by re-trying the request up to three
times. This is done with the 'zpublisher_exception_hook'.

In addition, the error hook is used to return an error message to the
user. In Zope the error hook creates error messages by calling the
'raise_standardErrorMessage' method. This method is implemented by
'SimpleItem.Item'. It acquires the 'standard_error_message' DTML
object, and calls it with information about the exception.

You will almost never need to override the
'raise_standardErrorMessage' method in your own classes, since it is
only needed to handle errors that are raised by other components. For
most errors, you can simply catch the exceptions normally in your code
and log error messages as needed. If you need to, you should be able
to customize application error reporting by overriding the
'standard_error_message' DTML object in your application.
Zope aborts the transaction.
When **ConflictErrors** occur, Zope retries the request up to three
times by default. You can change that number in the **zope.conf** by
adding a ``max_conflict_retries`` directive.

.. note::

For further information on transactions please refer to chapter 6
`ZODB Persistent Components <https://zope.readthedocs.io/en/latest/zdgbook/ZODBPersistentComponents.html>`_.


Manual Access to Request and Response
-------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion src/Zope2/utilities/skel/etc/zope.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline =
zope

[loggers]
keys = root, waitress, wsgi
keys = root, waitress.queue, waitress, wsgi

[handlers]
keys = console, accesslog, eventlog
Expand All @@ -37,6 +37,12 @@ format = %(message)s
level = INFO
handlers = console, eventlog

[logger_waitress.queue]
level = INFO
handlers = eventlog
qualname = waitress.queue
propagate = 0

[logger_waitress]
level = INFO
handlers = eventlog
Expand Down

0 comments on commit cdc6a9b

Please sign in to comment.