From 7506d1fb6002ff3374d81be33ff415c56700db8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Mikalk=C4=97nas?= Date: Mon, 20 Mar 2023 21:08:42 +0200 Subject: [PATCH] Add messenger.stop_worker_on_signals option documentation --- messenger.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/messenger.rst b/messenger.rst index ba8b3aac268..4d4fe94216a 100644 --- a/messenger.rst +++ b/messenger.rst @@ -757,8 +757,12 @@ Graceful Shutdown ................. If you install the `PCNTL`_ PHP extension in your project, workers will handle -the ``SIGTERM`` POSIX signal to finish processing their current message before -terminating. +the ``SIGTERM`` or ``SIGINT`` POSIX signals to finish processing their current +message before terminating. + +However, you might prefer to use different POSIX signals for graceful shutdown. +You can override default ones by setting ``framework.messenger.stop_worker_on_signals`` +configuration option. In some cases the ``SIGTERM`` signal is sent by Supervisor itself (e.g. stopping a Docker container having Supervisor as its entrypoint). In these cases you