algolia / algoliasearch-rails

AlgoliaSearch integration to your favorite ORM
MIT License
410 stars 118 forks source link

Allow configuration ActiveJob queue for auto_index #439

Closed bagedevimo closed 11 months ago

bagedevimo commented 1 year ago
Q A
Bug fix? no
New feature? yes
BC breaks? no, provided #438 merged first / removed
Related Issue Makes progress towards https://github.com/algolia/algoliasearch-rails/issues/85
Need Doc update yes

Describe your change

Copy-pasted from commit message:

    Allow library users to specify default ActiveJob queue for indexing

    The current auto_indexing behaviours are great, but force a user to
    effectively reimplement the default enqueue behaviour if they just wanna
    use a different ActiveJob queue. Instead, allow the queue_name to
    specified as a configuraiton option, but fallback to the default if no
    value is set.

    Someone who just updates to a version with this commit should see no
    difference until they supply a value for the configuration, if they
    wish.
bagedevimo commented 1 year ago

It's worth resolving if #438 is the direction Algolia would like to go before making decisions / reviewing this. After that PR is changed / merged / closed, i'll adjust this PR accordingly.

DevinCodes commented 1 year ago

Thank you for the PR @bagedevimo ! Sorry in advance but I won't have time to review this until after next week, but wanted to let you know I've seen it and will get to it. Apologies for the delay!

DevinCodes commented 1 year ago

Thank you for this change @bagedevimo ! Would like to merge this in if the comments in the other PR are addressed / updated in this PR 🙂

bagedevimo commented 1 year ago

Hi @DevinCodes i've updated this MR to use the stuff from #438

bagedevimo commented 11 months ago

It's not clear to me what the spec failures are - I can't reproduce the utilities spec failure locally, and the others seem to be failing due to me not having permissions to get a key?

bagedevimo commented 11 months ago

I raised https://github.com/algolia/algoliasearch-rails/issues/440 to cover some brief investigation into the likely cause of some of those specs. Feel free to just close it, but thought it might be helpful to briefly document what I'd discovered.

DevinCodes commented 11 months ago

@bagedevimo thanks again, we just released this in v2.3.1 of the gem! https://rubygems.org/gems/algoliasearch-rails/versions/2.3.1