/** * @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; }
public function __construct() { $args = func_get_args(); empty($args[0]) && ($args[0] = array()); $params = $args[0]; $this->setNick('synchronization'); parent::__construct($params); }
/** * @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; }
/** * @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; }
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); }
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); }
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; } }
public function _construct() { parent::_construct(); $this->_init('M2ePro/ListingsLockItem'); }
public function _construct() { parent::_construct(); $this->_init('M2ePro/Synchronization_LockItem'); }