LogLibJob->setConfigs( array( 'dbExecuteUser' => get_class($this), 'requestId' => 'LRT' ) ); // Loads LongRunTaskLib library $this->load->library('LongRunTaskLib'); $this->_jobid = null; // default value } /** * Destructor, once the LRT execution is over... */ public function __destruct() { // Sends email to the user // Set the status and the endtime of this LRT as done $lrtExecOverResult = $this->longruntasklib->lrtExecOver($this->_jobid); // If an error occurred then log it if (isError($lrtExecOverResult)) $this->logError($lrtExecOverResult); } //------------------------------------------------------------------------------------------------------------------ // Public methods abstract public function run($jobid); //------------------------------------------------------------------------------------------------------------------ // Protected methods /** * */ protected function getLrt() { return $this->longruntasklib->getLrt($this->_jobid); } /** * */ protected function setProgress($progress) { return $this->longruntasklib->setProgress($this->_jobid, $progress); } /** * */ protected function setOutput($output) { return $this->longruntasklib->setOutuput($this->_jobid, $output); } }