Stock/EventListener/AbstractStockUnitListener.php
public function onInsert(ResourceEventInterface $event)
    {
        $stockUnit = $this->getStockUnitFromEvent($event);

        if ($this->stateResolver->resolve($stockUnit)) {
            $this->persistenceHelper->persistAndRecompute($stockUnit, false);
        }

        $this->scheduleSubjectStockUnitChangeEvent($stockUnit);
    }
public function onInsert(ResourceEventInterface $event)
    {
        $stockUnit = $this->getStockUnitFromEvent($event);

        if ($this->stateResolver->resolve($stockUnit)) {
            $this->persistenceHelper->persistAndRecompute($stockUnit, false);
        }

        $this->scheduleSubjectStockUnitChangeEvent($stockUnit);
    }
Insert event handler.

@param ResourceEventInterface $event