New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Customize queue name #799

Closed
jkras opened this Issue Jan 5, 2017 · 4 comments

Comments

2 participants
@jkras

jkras commented Jan 5, 2017

Hey @ankane, firstly, thanks for searchkick. It has made life incredible!

Any idea how I could overwrite the queue name for reindex_async?

I did a little sniffing and found that the queue is labelled below, though am still reasonably knew to rails and would like to know the most appropriate way to customize this given I'm using your gem, rather than a job I've written myself.

class ReindexV2Job < ActiveJob::Base queue_as :searchkick

Thanks in advance

Jesse

@ankane

This comment has been minimized.

Show comment
Hide comment
@ankane

ankane Jan 6, 2017

Owner

Searchkick doesn't provide a way, but you can create an initializer with:

Searchkick::ReindexV2Job.queue_as :other_name

If someone wants to put together a PR for a Searchkick.queue_name method, I'll be happy to accept.

Owner

ankane commented Jan 6, 2017

Searchkick doesn't provide a way, but you can create an initializer with:

Searchkick::ReindexV2Job.queue_as :other_name

If someone wants to put together a PR for a Searchkick.queue_name method, I'll be happy to accept.

@ankane ankane changed the title from Question: Using AWS Credentials to Question: Customize queue name Jan 6, 2017

@jkras

This comment has been minimized.

Show comment
Hide comment
@jkras

jkras Jan 6, 2017

Thank you. I'd love to give the PR a crack, any tips or pointers on where to start? It would be my first open source contribution.

jkras commented Jan 6, 2017

Thank you. I'd love to give the PR a crack, any tips or pointers on where to start? It would be my first open source contribution.

@ankane

This comment has been minimized.

Show comment
Hide comment
@ankane

ankane Jan 7, 2017

Owner

Cool, you should be able to add it in a similar fashion to these methods. To make sure nothing broke, run the tests. For this feature, I don't think we need a new test. When you're done, create a PR and I'll take a look.

For general PR advice, check out the GitHub docs.

Owner

ankane commented Jan 7, 2017

Cool, you should be able to add it in a similar fashion to these methods. To make sure nothing broke, run the tests. For this feature, I don't think we need a new test. When you're done, create a PR and I'll take a look.

For general PR advice, check out the GitHub docs.

@ankane

This comment has been minimized.

Show comment
Hide comment
@ankane

ankane Apr 29, 2017

Owner

Added in #909

Owner

ankane commented Apr 29, 2017

Added in #909

@ankane ankane closed this Apr 29, 2017

mikelkew added a commit to mikelkew/searchkick that referenced this issue May 1, 2017

Merge commit '1fb35cc0f183480e018daa8a5da6b163f22732bd' into handle_h…
…ashie

* commit '1fb35cc0f183480e018daa8a5da6b163f22732bd': (27 commits)
  Use better ActiveRecord hook - fixes ankane#910
  Removed unnecessary option [skip ci]
  Updated readme
  resolve customizable queue name as requested in ankane#799 (ankane#909)
  Updated tests to ES 5.3.2
  fix bulk index without IDs ankane#907 (ankane#908)
  Updated tests to ActiveRecord 5.1
  Version bump to 2.2.1
  Added index_suffix option - ankane#891
  Added load: {dumpable: true} option - closes ankane#887
  Test on Elasticsearch 5.3
  Updated changelog [skip ci]
  Support avg, cardinality, min, max and sum metric aggregates (ankane#877)
  Support cardinality metric aggregator (ankane#876)
  Improved exclude example [skip ci]
  Accept string for exclude option
  Improved synonyms section [skip ci]
  Added test for OR operator scoring
  Version bump to 2.2.0
  Fixed exclude case for exact match
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment