You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #51593 [Messenger] Add the --all option to the messenger:failed:remove command (alexandre-daubois)
This PR was merged into the 6.4 branch.
Discussion
----------
[Messenger] Add the `--all` option to the `messenger:failed:remove` command
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | Todo
We have a development server (which we don't have direct access to the database). As this server serves as a test for our devs, error messages can accumulate in our failure transport. We wanted to use the `messenger:failed:remove` command to remove them, but unfortunately, we must provide ids individually. This is problematic as we have several hundreds of failed messages.
This PR adds the `--all` option to the command. This option **must** be used with the `--force` option (juste like `doctrine:schema:update --force` actually) to work. Example output:
```bash
$ bin/console messenger:failed:remove --all --force
...
Failed Message Details
======================
[WARNING] Message does not appear to have been sent to this transport after failing
------------ -------------------------
Class App\Message\YourMessage
Message Id 6
------------ -------------------------
! [NOTE] 4 messages were removed.
```
As you can see, you can of course still use the `--show-messages` option jointly.
Commits
-------
d1d39c0 [Messenger] Add `--all` option to the `messenger:failed:remove` command
0 commit comments