diff --git a/messenger.rst b/messenger.rst index 34e12bc473c..9a74fbd1231 100644 --- a/messenger.rst +++ b/messenger.rst @@ -762,7 +762,59 @@ message before terminating. However, you might prefer to use different POSIX signals for graceful shutdown. You can override default ones by setting the ``framework.messenger.stop_worker_on_signals`` -configuration option. +configuration option: + +.. configuration-block:: + + .. code-block:: yaml + + # config/packages/messenger.yaml + framework: + messenger: + stop_worker_on_signals: + - "SIGINT" + - "SIGTERM" + - "SIGUSR1" + + # ... + + .. code-block:: xml + + + + + + + + + + + + + + + + + .. code-block:: php + + use Symfony\Config\FrameworkConfig; + + return static function (FrameworkConfig $framework) { + $messenger = $framework->messenger(); + + // ... + + $messenger + ->stopWorkerOnSignals([\SIGINT, \SIGTERM, \SIGUSR1]) + // ... + ; + }; .. versionadded:: 6.3