daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $this->_getClient()->init($metadata->getTableName());
  2.    
  3. public function init($name)
  4. {
  5.     $tableName = $this->_factory->getSingleton('core/resource')->getTableName($name);
  6.     $this->_metadata = $this->_factory->getModel('enterprise_mview/metadata')
  7.         ->load($tableName, 'table_name');
  8.     if (!$this->_metadata->getId()) {
  9.         $this->_metadata->setTableName($tableName);
  10.     }
  11.     return $this;
  12. }
  13.    
  14. public function initByTableName($tableName)
  15. {
  16.     $this->_metadata = $this->_factory->getModel('enterprise_mview/metadata')
  17.         ->load($tableName, 'table_name');
  18.     if (!$this->_metadata->getId()) {
  19.         $this->_metadata->setTableName($tableName);
  20.     }
  21.     return $this;
  22. }
  23.    
  24. protected function _runCleanupAction(Enterprise_Mview_Model_Metadata $metadata)
  25. {
  26.     $this->_getClient()->initByTableName($metadata->getTableName());
  27.     try {
  28.         $this->_getClient()->execute('enterprise_mview/action_changelog_clear');
  29.     } catch (Exception $e) {
  30.         $this->_logger->logException($e);
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top