diff --git a/src/Discomp/Importer.php b/src/Discomp/Importer.php index 400c732..d13d901 100644 --- a/src/Discomp/Importer.php +++ b/src/Discomp/Importer.php @@ -15,8 +15,6 @@ use Exception; use AbraFlexi\RO; use AbraFlexi\RW; -use WyriHaximus\FileDescriptors\Factory; -use WyriHaximus\FileDescriptors\ListerInterface; /** * Description of Importer @@ -205,7 +203,8 @@ public function freshItems() $errors = 0; $freshItems = $this->getFreshItems(); foreach ($freshItems as $pos => $activeItemData) { - $this->sokoban->curlInit(); + $this->sokoban->connectionReset(); + $this->category->connectionReset(); $this->sokoban->dataReset(); $discompItemCode = $activeItemData['CODE']; $this->sokoban->setObjectName('(' . $pos . '/' . count($freshItems) . ') StoreItem:' . $discompItemCode); @@ -306,7 +305,6 @@ public function freshItems() } $this->updatePrice($activeItemData); - $this->sokoban->disconnect(); } } @@ -436,6 +434,7 @@ public function allTimeItems() */ public function updatePrice($activeItemData) { + $this->pricer->connectionReset(); $this->pricer->unsetDataValue('id'); $this->pricer->setDataValue('cenik', $this->sokoban); $this->pricer->setDataValue('kodIndi', $activeItemData['CODE']);