コード例 #1
0
 /**
  * @return Ess_M2ePro_Model_LockItem
  */
 protected function getLockItem()
 {
     if (!is_null($this->lockItem)) {
         return $this->lockItem;
     }
     $this->lockItem = Mage::getModel('M2ePro/LockItem');
     $this->lockItem->setNick('cron_strategy_serial');
     return $this->lockItem;
 }
コード例 #2
0
 public function __construct()
 {
     $args = func_get_args();
     empty($args[0]) && ($args[0] = array());
     $params = $args[0];
     $this->setNick('synchronization');
     parent::__construct($params);
 }
コード例 #3
0
 /**
  * @return Ess_M2ePro_Model_LockItem
  */
 protected function getLockItem()
 {
     if (!is_null($this->lockItem)) {
         return $this->lockItem;
     }
     $this->lockItem = Mage::getModel('M2ePro/LockItem');
     $this->lockItem->setNick('cron_task_' . $this->getNick());
     return $this->lockItem;
 }
コード例 #4
0
 /**
  * @return Ess_M2ePro_Model_LockItem
  */
 private function getFastTasksLockItem()
 {
     if (!is_null($this->fastTasksLockItem)) {
         return $this->fastTasksLockItem;
     }
     $this->fastTasksLockItem = Mage::getModel('M2ePro/LockItem');
     $this->fastTasksLockItem->setNick('cron_strategy_parallel_fast_tasks');
     return $this->fastTasksLockItem;
 }
コード例 #5
0
ファイル: LockItem.php プロジェクト: xiaoguizhidao/ecommerce
 public function __construct()
 {
     $args = func_get_args();
     empty($args[0]) && ($args[0] = array());
     $params = $args[0];
     if (!isset($params['component'])) {
         throw new Exception('Listing component is not defined.');
     }
     $this->setNick($params['component'] . '_listing_other');
     parent::__construct($params);
 }
コード例 #6
0
ファイル: LockItem.php プロジェクト: xiaoguizhidao/beut
 public function __construct()
 {
     $args = func_get_args();
     empty($args[0]) && ($args[0] = array());
     $params = $args[0];
     if (!isset($params['component'])) {
         throw new Exception('Listing component is not defined.');
     }
     $this->setNick('listing_other_' . $params['component']);
     $maxDeactivateTime = (int) Mage::helper('M2ePro/Module')->getConfig()->getGroupValue('/listings/lockItem/', 'max_deactivate_time');
     $this->setMaxDeactivateTime($maxDeactivateTime);
     parent::__construct($params);
 }
コード例 #7
0
ファイル: LockItem.php プロジェクト: technomagegithub/magento
 public function activate()
 {
     parent::activate();
     $now = Mage::helper('M2ePro')->getCurrentGmtDate(true);
     if ($now - $this->lastCheckKillTime < self::CHECK_KILL_INTERVAL) {
         return;
     }
     $this->lastCheckKillTime = $now;
     if (is_null($this->synchRunObj)) {
         return;
     }
     $synchId = $this->synchRunObj->getId();
     try {
         if (empty($synchId)) {
             throw new Exception();
         }
         $tempSynchObj = Mage::getModel('M2ePro/Synchronization_Run')->loadInstance($synchId);
     } catch (Exception $exception) {
         exit;
     }
     if ($tempSynchObj->getData('kill_now')) {
         exit;
     }
 }
コード例 #8
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('M2ePro/ListingsLockItem');
 }
コード例 #9
0
ファイル: LockItem.php プロジェクト: par-orillonsoft/app
 public function _construct()
 {
     parent::_construct();
     $this->_init('M2ePro/Synchronization_LockItem');
 }