Skip to content

Commit

Permalink
Disable search syncing during full imports [API-221]
Browse files Browse the repository at this point in the history
  • Loading branch information
IllyaMoskvin committed Dec 21, 2021
1 parent 6a4a2b5 commit 83f0c2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/Console/Commands/Import/ImportCollectionsFull.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ protected function importEndpoint($endpoint, $page = 1)
{
$model = $this->getModelForEndpoint($endpoint);

if (!$this->isPartial) {
$model::disableSearchSyncing();
}

$this->import('Collections', $model, $endpoint, $page);

if (!$this->isPartial) {
$model::enableSearchSyncing();
}
}

protected function getModelForEndpoint($endpoint)
Expand Down

0 comments on commit 83f0c2c

Please sign in to comment.