Open chapterjason opened 5 months ago
Could you please provide your symfony version and explain what 'docker compose stop xxx_worker' calls.
Does it dispatch WorkerStoppedEvent
?
Hey @Chris53897, I might wasn't explicit enough. I especially talking about the scenario in which the WorkerStoppedEvent
won't get called.
In my case the xxx_worker
service container is just a simple php bin/console messenger:consume async -vv
. But to be explicit, in my cases the event won't get called as the service will be killed a lot in development, which results in the lose cache objects.
Hey nice bundle.
My workers will restart on file changes in development to reload the used resource inside the worker. It looks like the onStop won't get triggered.
To overcome this, I created a command which I can use to clear the workers. It looks like this:
So basically, it would be nice to have a command for that like mine or any other solution to automatically remove workers which aren't really running. The command works in my case, but I am sure in other cases, without restarting the workers, they won't register themselves again.