Skip to content

Commit 3544154

Browse files
committed
feature #15581 [Messenger] Document StopWorkerException (lyrixx)
This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] Document `StopWorkerException` fixed #15476 Commits ------- 885e42d [Messenger] Document StopWorkerException
2 parents 0e1c690 + 885e42d commit 3544154

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

messenger.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,17 @@ The first argument is the receiver's name (or service id if you routed to a
461461
custom service). By default, the command will run forever: looking for new messages
462462
on your transport and handling them. This command is called your "worker".
463463

464+
.. tip::
465+
466+
To properly stop a worker, throw an instance of
467+
:class:`Symfony\\Component\\Messenger\\Exception\\StopWorkerException`.
468+
469+
.. versionadded:: 5.4
470+
471+
The :class:`Symfony\\Component\\Messenger\\Exception\\StopWorkerException`
472+
class was introduced in Symfony 5.4.
473+
474+
464475
Deploying to Production
465476
~~~~~~~~~~~~~~~~~~~~~~~
466477

0 commit comments

Comments
 (0)