Changeset 27595
- Timestamp:
- 02/05/10 15:41:41 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfSolrPlugin/branches/sf1.2/lib/task/sfLuceneServiceTask.class.php
r26532 r27595 137 137 throw new sfException('Server is running, cannot start (pid file : '.$this->getPidFile($app, $env).')'); 138 138 } 139 139 140 $instances = sfLucene::getAllInstances($this->configuration); 141 142 if(count($instances) == 0) 143 { 144 145 throw new sfException('There is no Solr instance for the current application'); 146 } 147 148 $host = $instances[0]->getParameter('host'); 149 $port = $instances[0]->getParameter('port'); 150 $base_url = $instances[0]->getParameter('base_url'); 151 140 152 // start the jetty built in server 141 $command = sprintf('cd %s/plugins/sfSolrPlugin/lib/vendor/Solr/example; %s %s -Dsolr.solr.home=%s/config/solr/ -Dsolr.data.dir=%s/data/solr_index - jar start.jar > %s/solr_server_%s_%s.log 2>&1 & echo $!',153 $command = sprintf('cd %s/plugins/sfSolrPlugin/lib/vendor/Solr/example; %s %s -Dsolr.solr.home=%s/config/solr/ -Dsolr.data.dir=%s/data/solr_index -Djetty.port=%s -jar start.jar > %s/solr_server_%s_%s.log 2>&1 & echo $!', 142 154 sfConfig::get('sf_root_dir'), 143 155 $this->nohup, … … 145 157 sfConfig::get('sf_root_dir'), 146 158 sfConfig::get('sf_root_dir'), 159 $port, 147 160 sfConfig::get('sf_root_dir').'/log', 148 161 $app, … … 161 174 162 175 $this->logSection("solr", "Server started with pid : ".$pid); 176 $this->logSection("solr", "server started : http://".$host.":".$port.$base_url); 163 177 } 164 178