public function add($class, $method, $data, $data_size) { // Insert a row for the new job $this->db->insert($this->table, array('class' => $class, 'method' => $method, 'data' => json_encode($data), 'data_size' => $data_size, 'pid' => null)); }
public function addToQueue($observer, $method, $data, $data_size) { if ($this->config->isQueueActive()) { $this->queue->add($observer, $method, $data, $data_size); } else { Mage::getSingleton($observer)->{$method}(new Varien_Object($data)); } }