Commit 4b6f05d
committed
feature symfony#49750 [FrameworkBundle] Allow to pass signals to
This PR was merged into the 7.3 branch.
Discussion
----------
[FrameworkBundle] Allow to pass signals to `StopWorkerOnSignalsListener` in XML config and as plain strings
| Q | A
| ------------- | ---
| Branch? | 7.3
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | _NA_
| License | MIT
| Doc PR | Todo
Follow-up of symfony#49702 to improve DX. This PR allows to provide signals this way:
```yaml
framework:
messenger:
transports:
async: '%env(MESSENGER_TRANSPORT_DSN)%'
stop_worker_on_signals:
- SIGINT
- SIGUSR1
```
XML:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
<framework:config>
<framework:messenger ...>
<framework:stop-worker-on-signal>SIGINT</framework:stop-worker-on-signal>
<framework:stop-worker-on-signal>SIGTERM</framework:stop-worker-on-signal>
<framework:stop-worker-on-signal>SIGUSR1</framework:stop-worker-on-signal>
<framework:stop-worker-on-signal>123</framework:stop-worker-on-signal>
</framework:messenger>
</framework:config>
</container>
```
Commits
-------
cd91c11 [FrameworkBundle] Add support for signal plain name in the `messenger.stop_worker_on_signals` configurationStopWorkerOnSignalsListener in XML config and as plain strings (alexandre-daubois)File tree
3 files changed
+23
-1
lines changed- src/Symfony/Bundle/FrameworkBundle
- DependencyInjection
- Resources/config/schema
3 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1572 | 1572 | | |
1573 | 1573 | | |
1574 | 1574 | | |
| 1575 | + | |
1575 | 1576 | | |
1576 | 1577 | | |
1577 | 1578 | | |
| |||
1704 | 1705 | | |
1705 | 1706 | | |
1706 | 1707 | | |
1707 | | - | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
1708 | 1728 | | |
1709 | 1729 | | |
1710 | 1730 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
612 | 613 | | |
613 | 614 | | |
614 | 615 | | |
| |||
0 commit comments