Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger] option --no-reset on messenger:consume is broken #46349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Ioni14 opened this issue May 14, 2022 · 0 comments
Closed

[Messenger] option --no-reset on messenger:consume is broken #46349

Ioni14 opened this issue May 14, 2022 · 0 comments

Comments

@Ioni14
Copy link
Contributor

Ioni14 commented May 14, 2022

Symfony version(s) affected

6.0.8

Description

Since this following commit, the option --no-reset does not work anymore. There is a ResetServicesListener that is in charge of this, so maybe we could move the function Worker::resetReceiverConnections() inside this listener when WorkerStoppedEvent is fired.

a4c8f4e

How to reproduce

Try to use bin/console messenger:consume with "--no-reset" option with the InMemoryTransport.

Possible Solution

There is a ResetServicesListener that is in charge of this, so maybe move the function Worker::resetReceiverConnections() inside this listener when WorkerStoppedEvent is fired.

Additional Context

No response

@Ioni14 Ioni14 added the Bug label May 14, 2022
@fabpot fabpot closed this as completed Jun 12, 2022
fabpot added a commit that referenced this issue Jun 12, 2022
… listener (Thomas Talbot)

This PR was merged into the 5.4 branch.

Discussion
----------

[Messenger] move resetting services at worker stopped into listener

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #46349
| License       | MIT

This PR tries to fix an issue about "--no-reset" introduced by a [previous fix](a4c8f4e).
Instead of resetting the resettable receivers after the WorkerStoppedEvent dispatch, the ResetServicesListener subscribes to it and resets the resettable services.
It allows --no-reset to work again because this option decides the ResetServicesListener to be added or not.

Commits
-------

16cf4fc [Messenger] move resetting services at worker stopped into ResetServicesListener
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants