Skip to content

Commit

Permalink
Add clarification about GracefulExit when using `handle_signals=Tru…
Browse files Browse the repository at this point in the history
…e` (#7043)
  • Loading branch information
Daste745 authored Sep 11, 2024
1 parent 194792a commit bee613d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES/4414.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarified that ``GracefulExit`` needs to be handled in ``AppRunner`` and ``ServerRunner`` when using ``handle_signals=True``. -- by :user:`Daste745`
16 changes: 14 additions & 2 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2596,7 +2596,8 @@ application on specific TCP or Unix socket, e.g.::
:param bool handle_signals: add signal handlers for
:data:`signal.SIGINT` and
:data:`signal.SIGTERM` (``False`` by
default).
default). These handlers will raise
:exc:`GracefulExit`.

:param kwargs: named parameters to pass into
web protocol.
Expand Down Expand Up @@ -2669,7 +2670,8 @@ application on specific TCP or Unix socket, e.g.::
:param bool handle_signals: add signal handlers for
:data:`signal.SIGINT` and
:data:`signal.SIGTERM` (``False`` by
default).
default). These handlers will raise
:exc:`GracefulExit`.

:param kwargs: named parameters to pass into
web protocol.
Expand Down Expand Up @@ -2800,6 +2802,16 @@ application on specific TCP or Unix socket, e.g.::

``128`` by default.

.. exception:: GracefulExit

Raised by signal handlers for :data:`signal.SIGINT` and :data:`signal.SIGTERM`
defined in :class:`AppRunner` and :class:`ServerRunner`
when ``handle_signals`` is set to ``True``.

Inherited from :exc:`SystemExit`,
which exits with error code ``1`` if not handled.


Utilities
---------

Expand Down

0 comments on commit bee613d

Please sign in to comment.