/** * Fetches chunks of project information and indexes them into Solr * * @return boolean Returns TRUE on success, FALSE if no items were indexed or none were found. * @throws Exception Throws an exception on indexing errors. * @see typo3/sysext/scheduler/tx_scheduler_Task#execute() */ public function execute() { $successfullyIndexed = FALSE; $this->initializeSolr(); // index projects $this->solrConnection->deleteByType(self::ITEM_TYPE_PROJECT); $projects = $this->getRedmineProjects(); $successfullyIndexed = $this->indexProjects($projects); $this->solrConnection->commit(); return $successfullyIndexed; }
/** * Executes the commit task and returns TRUE if the execution was * succesfull * * @return boolean returns TRUE on success, FALSE on failure */ public function execute() { $result = FALSE; if (is_null($this->solr)) { $this->initializeSolr(); } $response = $this->solr->commit(); if ($response->responseHeader->status === 0) { $result = TRUE; } return $result; }