public function onFinish($event)
    {
        $objectManager = $this->getObjectManager();
        $unitOfWork    = $objectManager->getUnitOfWork();
        
        if ($unitOfWork->size() > 0) {
            $objectManager->flush();
        }
    }