app/code/community/Nexcessnet/Turpentine/Helper/Cron.php
public function addProductToCrawlerQueue($product) {
        $productUrls = array();
        $origStore = Mage::app()->getStore();
        foreach (Mage::app()->getStores() as $storeId => $store) {
            Mage::app()->setCurrentStore($store);
            $baseUrl = $store->getBaseUrl(
                Mage_Core_Model_Store::URL_TYPE_LINK );
            $productUrls[] = $product->getProductUrl();
            foreach ($product->getCategoryIds() as $catId) {
                $cat = Mage::getModel('catalog/category')->load($catId);
                $productUrls[] = rtrim($baseUrl, '/').'/'.
                    ltrim($product->getUrlModel()
                        ->getUrlPath($product, $cat), '/');
            }
        }
        Mage::app()->setCurrentStore($origStore);
        return $this->addUrlsToCrawlerQueue($productUrls);
    }
public function addProductToCrawlerQueue($product) {
        $productUrls = array();
        $origStore = Mage::app()->getStore();
        foreach (Mage::app()->getStores() as $storeId => $store) {
            Mage::app()->setCurrentStore($store);
            $baseUrl = $store->getBaseUrl(
                Mage_Core_Model_Store::URL_TYPE_LINK );
            $productUrls[] = $product->getProductUrl();
            foreach ($product->getCategoryIds() as $catId) {
                $cat = Mage::getModel('catalog/category')->load($catId);
                $productUrls[] = rtrim($baseUrl, '/').'/'.
                    ltrim($product->getUrlModel()
                        ->getUrlPath($product, $cat), '/');
            }
        }
        Mage::app()->setCurrentStore($origStore);
        return $this->addUrlsToCrawlerQueue($productUrls);
    }
public function addProductToCrawlerQueue ( $ product ) { $ productUrls = array ( ) ; $ origStore = Mage :: app ( ) -> getStore ( ) ; foreach ( Mage :: app ( ) -> getStores ( ) as $ storeId => $ store ) { Mage :: app ( ) -> setCurrentStore ( $ store ) ; $ baseUrl = $ store -> getBaseUrl ( Mage_Core_Model_Store :: URL_TYPE_LINK ) ; $ productUrls [ ] = $ product -> getProductUrl ( ) ; foreach ( $ product -> getCategoryIds ( ) as $ catId ) { $ cat = Mage :: getModel ( 'catalog/category' ) -> load ( $ catId ) ; $ productUrls [ ] = rtrim ( $ baseUrl , '/' ) . '/' . ltrim ( $ product -> getUrlModel ( ) -> getUrlPath ( $ product , $ cat ) , '/' ) ; } } Mage :: app ( ) -> setCurrentStore ( $ origStore ) ; return $ this -> addUrlsToCrawlerQueue ( $ productUrls ) ; }
Add URLs to the queue by product model

@param Mage_Catalog_Model_Product $product
@return int
Add URLs to the queue by product model