diff --git a/src/Task/ProductModel/BatchProductModelTask.php b/src/Task/ProductModel/BatchProductModelTask.php index a0a8c3cf..dfeffc26 100644 --- a/src/Task/ProductModel/BatchProductModelTask.php +++ b/src/Task/ProductModel/BatchProductModelTask.php @@ -5,7 +5,6 @@ namespace Synolia\SyliusAkeneoPlugin\Task\ProductModel; use Doctrine\DBAL\Exception; -use Doctrine\DBAL\Result; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\ORMInvalidArgumentException; use Doctrine\Persistence\ManagerRegistry; @@ -64,7 +63,6 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte $this->logger->notice(Messages::createOrUpdate($this->type)); $query = $this->getSelectStatement($payload); - /** @var Result $queryResult */ $queryResult = $query->executeQuery(); while ($results = $queryResult->fetchAllAssociative()) { @@ -100,7 +98,7 @@ public function __invoke(PipelinePayloadInterface $payload): PipelinePayloadInte $this->entityManager = $this->getNewEntityManager(); } - } while (false === $isSuccess && $this->retryCount !== $this->maxRetryCount); + } while (false === $isSuccess && $this->retryCount < $this->maxRetryCount); unset($resource); $this->removeEntry($payload, (int) $result['id']);