From 2d513723ffaf6142ef90ec1d2244988782d8093f Mon Sep 17 00:00:00 2001 From: enesaktay <21998826+enesaktay@users.noreply.github.com> Date: Wed, 25 Jul 2018 12:14:43 +0200 Subject: [PATCH] remove date check on import --- src/Exporter/MqItemReader.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Exporter/MqItemReader.php b/src/Exporter/MqItemReader.php index ddf02ba5..e9dc0011 100644 --- a/src/Exporter/MqItemReader.php +++ b/src/Exporter/MqItemReader.php @@ -65,22 +65,10 @@ public function readAndImport(): void /** @var RedisConsumer $consumer */ $consumer = $this->redisContext->createConsumer($this->queue); - $dataTimestampArray = []; - /** @var RedisMessage $message */ while ($message = $consumer->receive()) { $dataArrayToImport = (array) json_decode($message->getBody()); - $dataTimestamp = strtotime($message->getHeader('recordedOn')); - - if (array_key_exists($dataArrayToImport['Id'], $dataTimestampArray)) { - if ($dataTimestampArray[$dataArrayToImport['Id']] >= $dataTimestamp) { - ++$this->messagesSkippedCount; - - continue; - } - } - $dataTimestampArray[$dataArrayToImport['Id']] = $dataTimestamp; $this->service->importSingleDataArrayWithoutResult($dataArrayToImport); ++$this->messagesImportedCount; }