Skip to content

Commit

Permalink
introduce setting "testConnection" that allows to disable initial pin…
Browse files Browse the repository at this point in the history
…g requests
  • Loading branch information
cradeck committed Feb 1, 2024
1 parent fef747a commit d7dae40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Service/SolrServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ public function connect()
$client = new Client($adapter, $eventDispatcher, $connectionSettings);

$this->setConnection($client);
$this->testConnection();
if (filter_var($this->settings["testConnection"]??true, FILTER_VALIDATE_BOOLEAN)) {
$this->testConnection();
}

$this->timeTracker= GeneralUtility::makeInstance(TimeTracker::class);
$this->timing['INIT_START'] = $this->timeTracker->getDifferenceToStarttime();
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ provider and an options array.
The `plugin.tx_find.settings.activeConnection` determines the currently
used connection. The default value is `default`.
Per default, the connection is tested upon initialization (ping request).
Using the boolean setting `plugin.tx_find.settings.testConnection` this behavior
can be disabled.
The `options` settings array in a connection definition is used to
configure access to the Solr index. It contains:
Expand Down

0 comments on commit d7dae40

Please sign in to comment.