24 if (!Loader::includeModule(self::$moduleId))
34 if (empty($queueOption))
40 $iblockId = ($queueOption[
"iblockId"] ?: 0);
41 $copiedIblockId = ($queueOption[
"copiedIblockId"] ?: 0);
42 $errorOffset = ($queueOption[
"errorOffset"] ?: 0);
45 $offset = $this->getOffset($copiedIblockId) + $errorOffset;
47 $enumRatio = ($queueOption[
"enumRatio"] ?: []);
48 $sectionsRatio = ($queueOption[
"sectionsRatio"] ?: []);
49 $mapIdsCopiedElements = ($queueOption[
"mapIdsCopiedElements"] ?: []);
53 list($elementIds, $selectedRowsCount) = $this->getElementIds($iblockId, $limit, $offset);
57 $elementIds, $sectionsRatio, $enumRatio, $copiedIblockId);
58 $result = $elementCopier->copy($containerCollection);
59 if (!$result->isSuccess())
61 $queueOption[
"errorOffset"] += $this->
getErrorOffset($elementCopier);
64 $mapIdsCopiedElements = $elementCopier->getMapIdsCopiedEntity() + $mapIdsCopiedElements;
65 $queueOption[
"mapIdsCopiedElements"] = $mapIdsCopiedElements;
68 if ($selectedRowsCount < $limit)
76 $option[
"steps"] = $offset;
86 catch (\Exception $exception)