algolia / scout-extended

Scout Extended: The Full Power of Algolia in Laravel
https://www.algolia.com/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended/
MIT License
393 stars 85 forks source link

fix: force sync reimport #299

Closed DevinCodes closed 2 years ago

DevinCodes commented 2 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no

Describe your change

This force the queue to be disabled during a reimport. This allows us to reimport lots of records (1M+) without having to worry about race conditions (performing the moveIndex before all records have been imported).

We can disable the queue here as well because it's meant to improve performance during requests, but this script is never called during requests so we don't have to queue the operations, especially since it can lead to issues when you have a big number of records.