LogLibJob->setConfigs( array( 'dbExecuteUser' => get_class($this), 'requestId' => 'LRT' ) ); // Loads LongRunTaskLib library $this->load->library('LongRunTaskLib'); } /** * */ public function execEmAll() { $this->logInfo('Execute long run tasks started'); // Get all the LRTs that is possible to execute now $lrtsResult = $this->longruntasklib->getLRTs(); if (isError($lrtsResult)) return $lrtsResult; // For each LRT foreach (getData($lrtsResult) as $lrt) { // Execute the task $execResult = $this->longruntasklib->executeLrt($lrt); // If an error occurred log it and continue with the next one if (isError($execResult)) $this->logError(getError($execResult)); } $this->logInfo('Execute long run tasks ended'); } }