|
$this->storedEventRepository->save($storedEvent); |
Maybe we can also inject entity manager and clear it after saving storedEvents here ^, say if the batch size is reasonably high (or/and if the command remains running for too long and keeps on publishing and saving events), all stored events will stay in unit of work and might eat up memory?
ddd-bundle/src/Infrastructure/Console/PublishDomainEventsCommand.php
Line 84 in d13ad0b
Maybe we can also inject entity manager and clear it after saving storedEvents here ^, say if the batch size is reasonably high (or/and if the command remains running for too long and keeps on publishing and saving events), all stored events will stay in unit of work and might eat up memory?