more replacements and patches to migrate this module to 4.0

This commit is contained in:
elliot sawyer 2017-02-17 17:37:32 +13:00
parent bbdf79ea2b
commit 7c27484d24
2 changed files with 5 additions and 1 deletions

View File

@ -339,7 +339,9 @@ class Solr_Reindex extends Solr_BuildTask
*/ */
protected function getHandler() protected function getHandler()
{ {
return Injector::inst()->get('SolrReindexHandler'); //@todo: this needs to determine the best class from a Factory implementation
//@todo: it was 'SolrReindexHandler' but that doesn't work on 4.0
return Injector::inst()->get('SolrReindexImmediateHandler');
} }
/** /**
@ -397,6 +399,7 @@ class Solr_Reindex extends Solr_BuildTask
// If not using queuedjobs, we need to invoke Solr_Reindex as a separate process // If not using queuedjobs, we need to invoke Solr_Reindex as a separate process
// Otherwise each group is processed via a SolrReindexGroupJob // Otherwise each group is processed via a SolrReindexGroupJob
$groups = $request->getVar('groups'); $groups = $request->getVar('groups');
$handler = $this->getHandler(); $handler = $this->getHandler();
if ($groups) { if ($groups) {
// Run grouped batches (id % groups = group) // Run grouped batches (id % groups = group)

View File

@ -1,6 +1,7 @@
<?php <?php
Solr::include_client_api(); Solr::include_client_api();
use SilverStripe\Core\Config\Config;
/** /**
* The API for accessing a specific core of a Solr server. Exactly the same as Apache_Solr_Service for now. * The API for accessing a specific core of a Solr server. Exactly the same as Apache_Solr_Service for now.