public function aroundDelete(\Magento\Catalog\Model\ResourceModel\Category $categoryResource, \Closure $proceed, \Magento\Framework\Model\AbstractModel $category)
 {
     $categoryResource->addCommitCallback(function () use($category) {
         if (!$this->indexer->isScheduled()) {
             Category::$affectedProductIds = (array) $category->getAffectedProductIds();
             $this->indexer->reindexRow($category->getId());
         }
     });
     return $proceed($category);
 }