Closed tmarly closed 2 years ago
Hello @tmarly,
Thanks for your issue.
We need to review the management of events...
The removeEventListener
prevent an infinite loop when we dispatch the reindex message (with doctrine transport).
For the moment, I have added a workaround to dispatch manually message (in my example for product import) in PR #138. This should help you manage your case.
Indeed my need is to import many products, so your PR is perfect, thanks 👍
Hi,
I do not understand the reason of this line:
Why removing the event listener on the onFlush event ? If I'm calling
$em->flush()
a second time, products won't trigger the event, so they won't be reindexed ...