$this->stockStorage->
index(array_values($stocks),
$event->
getContext());
} else { $this->stockUpdater->
update(array_values($stocks),
$event->
getContext());
} });
$message =
new ProductIndexingMessage(array_values($updates), null,
$event->
getContext());
$message->
addSkip(self::INHERITANCE_UPDATER, self::STOCK_UPDATER
);
$delayed = \
array_unique(\
array_filter(\
array_merge( $this->
getParentIds($updates),
$this->
getChildrenIds($updates) )));
foreach (\
array_chunk($delayed, 50
) as $chunk) { $child =
new ProductIndexingMessage($chunk, null,
$event->
getContext());
$child->
setIndexer($this->
getName());
EntityIndexerRegistry::
addSkips($child,
$event->
getContext());
$this->messageBus->
dispatch($child);
} return $message;
}