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


PHP Mage_Index_Model_Process::getId方法代码示例

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


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

示例1: setUp

 protected function setUp()
 {
     $this->_objectManager = Mage::getObjectManager();
     // get existing indexer process
     $this->_model = $this->_objectManager->create('Mage_Index_Model_Process');
     $this->_model->load(self::INDEXER_CODE, 'indexer_code');
     if ($this->_model->isObjectNew()) {
         $this->markTestIncomplete('Can\'t run test without ' . self::INDEXER_CODE . ' indexer.');
     }
     // get new process file instance for current indexer
     /** @var $lockStorage Mage_Index_Model_Lock_Storage */
     $lockStorage = $this->_objectManager->create('Mage_Index_Model_Lock_Storage');
     $this->_processFile = $lockStorage->getFile($this->_model->getId());
 }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例2: setDataFromProcess

 /**
  * Set start time and end time based on current process data
  *
  * @param Mage_Index_Model_Process $process
  * @return $this
  */
 public function setDataFromProcess(Mage_Index_Model_Process $process)
 {
     $startTime = new DateTime($process->getStartedAt());
     $endTime = new DateTime($process->getEndedAt());
     $runningTime = $endTime->getTimestamp() - $startTime->getTimestamp();
     $this->setData(array('process_id' => $process->getId(), 'started_at' => $process->getStartedAt(), 'ended_at' => $process->getEndedAt(), 'running_time' => $runningTime));
     return $this;
 }
开发者ID:toanloau,项目名称:Hackathon_IndexerStats,代码行数:14,代码来源:History.php

示例3: addProcessFilter

 /**
  * Add filter by process and status to events collection
  *
  * @param int|array|Mage_Index_Model_Process $process
  * @param string $status
  * @return Mage_Index_Model_Resource_Event_Collection
  */
 public function addProcessFilter($process, $status = null)
 {
     $this->_joinProcessEventTable();
     if ($process instanceof Mage_Index_Model_Process) {
         $this->addFieldToFilter('process_event.process_id', $process->getId());
     } elseif (is_array($process) && !empty($process)) {
         $this->addFieldToFilter('process_event.process_id', array('in' => $process));
     } else {
         $this->addFieldToFilter('process_event.process_id', $process);
     }
     if ($status !== null) {
         $this->addFieldToFilter('process_event.status', $status);
     }
     return $this;
 }
开发者ID:Airmal,项目名称:Magento-Em,代码行数:22,代码来源:Collection.php

示例4: updateProcessEndDate

 /**
  * Update process end date
  *
  * @param Mage_Index_Model_Process $process
  * @return Mage_Index_Model_Resource_Process
  */
 public function updateProcessEndDate(Mage_Index_Model_Process $process)
 {
     $this->_updateProcessData($process->getId(), array('ended_at' => $this->formatDate(time())));
     return $this;
 }
开发者ID:hazaeluz,项目名称:magento_connect,代码行数:11,代码来源:Process.php

示例5: startProcess

 /**
  * Register process start
  *
  * @param   Mage_Index_Model_Process $process
  * @return  Mage_Index_Model_Mysql4_Process
  */
 public function startProcess(Mage_Index_Model_Process $process)
 {
     $data = array('status' => Mage_Index_Model_Process::STATUS_RUNNING, 'started_at' => $this->formatDate(time()));
     $this->_getWriteAdapter()->update($this->getMainTable(), $data, $this->_getWriteAdapter()->quoteInto('process_id=?', $process->getId()));
     return $this;
 }
开发者ID:hunnybohara,项目名称:magento-chinese-localization,代码行数:12,代码来源:Process.php

示例6: updateStatus

 /**
  * Update process status field
  *
  *
  * @param Mage_Index_Model_Process $process
  * @param string $status
  * @return Mage_Index_Model_Resource_Process
  */
 public function updateStatus($process, $status)
 {
     $data = array('status' => $status);
     $this->_updateProcessData($process->getId(), $data);
     return $this;
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:14,代码来源:Process.php

示例7: getUnprocessedEvents

 /**
  * Retrieve unprocessed events list by specified process
  *
  * @param Mage_Index_Model_Process $process
  * @return array
  */
 public function getUnprocessedEvents($process)
 {
     $select = $this->_getReadAdapter()->select()->from($this->getTable('index/process_event'))->where('process_id = ?', $process->getId())->where('status = ?', Mage_Index_Model_Process::EVENT_STATUS_NEW);
     return $this->_getReadAdapter()->fetchAll($select);
 }
开发者ID:test3metizsoft,项目名称:test,代码行数:11,代码来源:Event.php

示例8: getRowUrl

 /**
  * Get row edit url
  *
  * @param Mage_Index_Model_Process $row
  *
  * @return string
  */
 public function getRowUrl($row)
 {
     return $this->getUrl('*/*/edit', array('process' => $row->getId()));
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:11,代码来源:Grid.php

示例9: getRowUrl

 /**
  * Get row edit url
  *
  * @param Mage_Index_Model_Process $row
  *
  * @return string
  */
 public function getRowUrl($row)
 {
     if (!$row->isEnterpriseProcess()) {
         return $this->getUrl('*/*/edit', array('process' => $row->getId()));
     }
     return '';
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:14,代码来源:Grid.php

示例10: getProgress

 public function getProgress(Mage_Index_Model_Process $process)
 {
     $avgTime = Mage::getModel('hackathon_indexerstats_resource/history')->getAvg($process->getId());
     $currentTime = new DateTime();
     $startTime = new DateTime($process->getStartedAt());
     $estimatedEndTime = new DateTime($process->getStartedAt());
     $estimatedEndTime->add(new DateInterval('PT' . $avgTime . 'S'));
     $processDiff = $currentTime->getTimestamp() - $startTime->getTimestamp();
     if ($avgTime == 0) {
         return 1;
     }
     return $processDiff / $avgTime;
 }
开发者ID:toanloau,项目名称:Hackathon_IndexerStats,代码行数:13,代码来源:Runtime.php


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