source/Core/GenericImport/GenericImport.php
protected function afterImport($data)
    {
        $statistics = $this->getStatistics();

        $dataForRetry = [];
        foreach ($statistics as $key => $value) {
            if ($value['r'] == false) {
                $this->returnMessage .= "File[" . $this->importFilePath . "] - dataset number: $key - Error: " . $value['m'] . " ---<br> " . PHP_EOL;
                $dataForRetry[$key] = $data[$key];
            }
        }

        if (!empty($dataForRetry) && (!$this->retried || count($dataForRetry) != count($data))) {
            $this->retried = true;
            $this->returnMessage = '';
            $this->importData($dataForRetry);
        }
    }
protected function afterImport($data)
    {
        $statistics = $this->getStatistics();

        $dataForRetry = [];
        foreach ($statistics as $key => $value) {
            if ($value['r'] == false) {
                $this->returnMessage .= "File[" . $this->importFilePath . "] - dataset number: $key - Error: " . $value['m'] . " ---<br> " . PHP_EOL;
                $dataForRetry[$key] = $data[$key];
            }
        }

        if (!empty($dataForRetry) && (!$this->retried || count($dataForRetry) != count($data))) {
            $this->retried = true;
            $this->returnMessage = '';
            $this->importData($dataForRetry);
        }
    }
protected function afterImport ( $ data ) { $ statistics = $ this -> getStatistics ( ) ; $ dataForRetry = [ ] ; foreach ( $ statistics as $ key => $ value ) { if ( $ value [ 'r' ] == false ) { $ this -> returnMessage .= "File[" . $ this -> importFilePath . "] - dataset number: $key - Error: " . $ value [ 'm' ] . " ---<br> " . PHP_EOL ; $ dataForRetry [ $ key ] = $ data [ $ key ] ; } } if ( ! empty ( $ dataForRetry ) && ( ! $ this -> retried || count ( $ dataForRetry ) != count ( $ data ) ) ) { $ this -> retried = true ; $ this -> returnMessage = '' ; $ this -> importData ( $ dataForRetry ) ; } }
Performs after import actions.
If any error occurred during import tries to run import again and marks retried as true.
If after running import second time all of the records failed, stops.

@param array $data
Performs after import actions . If any error occurred during import tries to run import again and marks retried as true . If after running import second time all of the records failed stops .