/** * Reports number of active products to the database reporting_counts table * * @return void */ protected function reportProductsActive() { $productsActiveCount = $this->productManagement->getCount(Status::STATUS_ENABLED); /** @var \Magento\NewRelicReporting\Model\Counts $model */ $model = $this->countsFactory->create()->load(Config::ACTIVE_COUNT, 'type'); $this->updateCount($productsActiveCount, $model, Config::ACTIVE_COUNT); }
/** * Get count of products which are active * * @return int */ public function getActiveCatalogSize() { $count = $this->productManagement->getCount(Status::STATUS_ENABLED); return (int) $count; }