当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Index_Model_Process::reindexAll方法代码示例

本文整理汇总了PHP中Mage_Index_Model_Process::reindexAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Index_Model_Process::reindexAll方法的具体用法?PHP Mage_Index_Model_Process::reindexAll怎么用?PHP Mage_Index_Model_Process::reindexAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Index_Model_Process的用法示例。


在下文中一共展示了Mage_Index_Model_Process::reindexAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: reindexAll

 /**
  * Reindex all data what this process responsible is
  *
  */
 public function reindexAll($force = false)
 {
     if (!$force && Mage::getStoreConfig('asyncindex/general/full_reindex')) {
         $this->changeStatus(Mirasvit_AsyncIndex_Model_Process::STATUS_WAIT);
     } else {
         parent::reindexAll();
     }
 }
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:12,代码来源:Process.php

示例2: reindexAll

 /**
  * @return $this
  */
 public function reindexAll()
 {
     if ($this->isLocked()) {
         Mage::throwException(Mage::helper('schumacherfm_fastindexer')->__('%s Index process is working now. Please try run this process later or remove the lock if no indexer is running!', $this->getIndexer()->getName()));
     }
     Mage::dispatchEvent(self::BEFORE_REINDEX_PROCESS_EVENT . $this->getIndexerCode());
     return parent::reindexAll();
 }
开发者ID:ThomasNegeli,项目名称:Magento-FastIndexer,代码行数:11,代码来源:Process.php

示例3: reindexAll

 /**
  * Reindex all data
  * if process status is "pending" than we process only the event queue, else
  * if process status is "index_required" we are reindexing everything
  *
  */
 public function reindexAll()
 {
     if ($this->getMode() !== self::MODE_QUEUED) {
         return parent::reindexAll();
     }
     if ($this->isLocked()) {
         Mage::throwException(Mage::helper('index')->__('%s Index process is working now. Please try run this process later.', $this->getIndexer()->getName()));
     }
     $processStatus = $this->getStatus();
     $this->_getResource()->startProcess($this);
     $this->lock();
     $processedSomething = TRUE;
     try {
         $eventsCollection = $this->getUnprocessedEventsCollection();
         /** @var $eventResource Mage_Index_Model_Resource_Event */
         $eventResource = Mage::getResourceSingleton('index/event');
         if ($processStatus == self::STATUS_PENDING || $this->getForcePartialReindex()) {
             if ($eventsCollection->count() > 0) {
                 $this->_getResource()->beginTransaction();
                 try {
                     $this->_processEventsCollection($eventsCollection, false);
                     $this->_getResource()->commit();
                 } catch (Exception $e) {
                     $this->_getResource()->rollBack();
                     throw $e;
                 }
             } else {
                 $processedSomething = FALSE;
             }
         } else {
             //Update existing events since we'll do reindexAll
             $eventResource->updateProcessEvents($this);
             $this->getIndexer()->reindexAll();
         }
         $this->unlock();
         $this->_getResource()->endProcess($this);
     } catch (Exception $e) {
         $this->unlock();
         $this->_getResource()->failProcess($this);
         throw $e;
     }
     if ($processedSomething) {
         //we want to dispatch this event only if we actually processed sth
         Mage::dispatchEvent('after_reindex_process_' . $this->getIndexerCode());
     }
 }
开发者ID:brentwpeterson,项目名称:Aoe_Index,代码行数:52,代码来源:Process.php


注:本文中的Mage_Index_Model_Process::reindexAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。