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
Added ability to customize sidekiq_options in listeners #13
Conversation
@k-rudy thanks for doing this, deploying your fork now |
Gemfile
Outdated
@@ -8,6 +8,9 @@ gem 'rspec' | |||
gem 'coveralls', require: false | |||
|
|||
gem 'psych', platforms: :rbx | |||
gem 'rack', '~> 1.6.5' | |||
gem 'tins', '~> 1.6.0' | |||
gem 'term-ansicolor', '~> 1.3.2' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are these dependencies used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are already used by the gem. Nothing new was added. When not frozen - they are resolved to higher versions by bundler and as a result build failed for earlier ruby versions. See https://travis-ci.org/krisleech/wisper-sidekiq/builds/214653091 for details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, I guess they might not be needed since updated the Ruby versions on CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, will remove those changes then
I'm definitely open to these changes:
But I'm not convinced that we need to change Wisper, as per the discussion here: krisleech/wisper#159 |
If you merge master (which I just updated) CI should pass :) |
Any progress on this? Thanks. |
@krisleech it still waits for krisleech/wisper#159 to be merged. |
Closing in favor of #17 |
@krisleech what's the example of defining options. From the README it's not straightforward:
It it like this: WisperSubscriber.subscribe(UserListener, async: true, sidekiq_options: { queue: 'custom' }) ? |
@k-rudy please take a look at - https://github.com/krisleech/wisper-sidekiq/pull/17/files#diff-2d6df3b20624fe23ec544f0a2cdecd1bR21 - you basically define class method on your listener class; feel free to improve readme via PR! (it was my doing - the change, but right now I'm pretty occupied) cheers! 🍻 |
@emq got it, thanks |
Hey guys,
This PR adds support of custom
sidekiq_options
when registering a listener.In order to work it requires few changes in Wisper krisleech/wisper#159.
It supports all existing configurations + adds ability to pass additional options via the following syntax:
Decreased coverage is expected as one of the specs is suspended until
wisper
PR is merged. Afterwisper
part is merged we'll need to remove this line https://github.com/krisleech/wisper-sidekiq/pull/13/files#diff-078c1c61de993e867792139abaaba7d3R42 that will enable the spec for the new syntax.JRuby build is failing for unknown reason. I wish I could ssh to container to debug it but have no access. Locally tests work fine on this JRuby version though. Appreciate any ideas. Also @krisleech if you could restart the master branch build (it was not run for 2 years) to make sure it's failing definitely because of the changes in this PR and not because of something else.
Thanks for consideration and appreciate your thoughts.