Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries.
The issue described in #266 also affects Craft 3 version of this plugin. So this PR back-ports the fix as is.
What we usually do in our own custom modules when it comes to potentially off-loading to the queue, is to always run the job. But conditionally on the queue.
This way both paths end up doing the same work. Now if Scout::$plugin->getSettings()->queue === false, the extra work that the Job does does not get executed.
I didn't think I should "pollute" this PR with that, but I could put this in a new PR if interested?
The issue described in #266 also affects Craft 3 version of this plugin. So this PR back-ports the fix as is.
What we usually do in our own custom modules when it comes to potentially off-loading to the queue, is to always run the job. But conditionally on the queue.
So, in this case we would have done:
This way both paths end up doing the same work. Now if
Scout::$plugin->getSettings()->queue === false
, the extra work that the Job does does not get executed.I didn't think I should "pollute" this PR with that, but I could put this in a new PR if interested?