From 7c27484d24b8d0431c32c7b11387975b6e6f0d09 Mon Sep 17 00:00:00 2001 From: elliot sawyer Date: Fri, 17 Feb 2017 17:37:32 +1300 Subject: [PATCH] more replacements and patches to migrate this module to 4.0 --- code/solr/Solr.php | 5 ++++- code/solr/SolrService.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/solr/Solr.php b/code/solr/Solr.php index 73ac0fb..b79a160 100644 --- a/code/solr/Solr.php +++ b/code/solr/Solr.php @@ -339,7 +339,9 @@ class Solr_Reindex extends Solr_BuildTask */ 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 // Otherwise each group is processed via a SolrReindexGroupJob $groups = $request->getVar('groups'); + $handler = $this->getHandler(); if ($groups) { // Run grouped batches (id % groups = group) diff --git a/code/solr/SolrService.php b/code/solr/SolrService.php index 7b8c448..7a4e1c6 100644 --- a/code/solr/SolrService.php +++ b/code/solr/SolrService.php @@ -1,6 +1,7 @@