teamtnt / laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch
MIT License
1.1k stars 144 forks source link

Support for Queues? #193

Closed reminisc3 closed 3 months ago

reminisc3 commented 6 years ago

Hi,

Just wondering if this package supports queues? I am using Laravel 5.7 with Redis and noticed that the index files fail to be generated whenever SCOUT_QUEUE=true. When I set to false and use scout:import or update a model with the Searchable trait, the index files are generated.

Thanks!

thoresuenert commented 6 years ago

be explicit about "fails to be generated"?

We are using it with queues in a production environment without a problem in combination with laravel/horizon

reminisc3 commented 6 years ago

I am using Horizon as well to monitor the queue. I can see that the queue jobs are being processed successfully, however, I am not seeing any index files being created in the storage folder. I am not seeing any errors or exceptions either when creating/updating models either.

Am I correct in assuming that the index files are supposed to be generated automatically when creating or updating models with the Searchable trait?

Thanks

thoresuenert commented 6 years ago

@reminisc3 your assumption is correct. that sounds like a misconfiguration. maybe this helps: https://github.com/teamtnt/laravel-scout-tntsearch-driver/issues/61#issuecomment-401409268

otherwise are you able to provide more information about your setup?

reminisc3 commented 6 years ago

Hi,

After doing some more testing, here are my findings:

I am not seeing any issues with the config, and here is an example of a successful queue worker where no index file was generated:

image

I am ok with running tntsearch:import when bootstrapping my app for all my models beforehand - but not sure if this is expected behavior.

Some screenshots of my config:

//horizon.php image

//scout.php image

image

//queue.php image

Thanks