#Laravel Scout import relationship with queue ?
1 messages · Page 1 of 1 (latest)
What do you mean? The docs just mention that eager loaded relationships won't be eager loaded when running in a queue. You can still use them, they will just be lazy loaded.
But lazy loaded for +3M entries ?
I have more than 5 relations to load, so it's 3.000.000*5 requests for an import ? uh
You could override Scout:: $makeSearchableJob with a custom job class that eager loads the relationships.
But if importing millions of models is a one time thing, why not just create an artisan command that disables queuing and then calls scout:import?