From 495fddf9a610ef1d2f37f34d553537eaa6079861 Mon Sep 17 00:00:00 2001 From: Philippe Moreau <828608+philmoreau@users.noreply.github.com> Date: Fri, 12 Apr 2019 14:23:50 -0400 Subject: [PATCH] Fixes #823 Clear repository after update to allow refreshing on subsequent calls. --- Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php b/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php index 1f818ca..9f05fce 100644 --- a/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php +++ b/Doctrine/Queue/SyncIndexWithObjectChangeProcessor.php @@ -81,6 +81,8 @@ public function process(Message $message, Context $context): Result $persister->deleteOne($object); } } + + $repository->clear(); return Result::ack(); case self::INSERT_ACTION: @@ -93,6 +95,8 @@ public function process(Message $message, Context $context): Result if ($persister->handlesObject($object) && $this->indexable->isObjectIndexable($index, $type, $object)) { $persister->insertOne($object); } + + $repository->clear(); return Result::ack(); case self::REMOVE_ACTION: