-
Notifications
You must be signed in to change notification settings - Fork 368
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
Add shoryuken async strategy #532
Conversation
Cool, can you also fix the readme and the changelog please? |
Done. |
ok, can you add the changelog entry on top, please? Also, did you test it manually? Does it work? If so, I'll merge it as soon as specs pass |
Oops, sorry. |
The specs pass, and I've tested it manually. But I think I've noticed a problem in copying the worker and specs from the sidekiq strategy to shoryuken. Shoryuken only passes in sqs_msg and body into the worker and not options, which would be a problem for passing in https://github.com/phstc/shoryuken/blob/master/lib/shoryuken/processor.rb#L17 |
can we use |
lib/chewy/strategy/shoryuken.rb
Outdated
def leave | ||
@stash.each do |type, ids| | ||
next if ids.empty? | ||
Shoryuken::Worker.perform_async({index: type, ids: ids}, queue: shoryuken_queue) |
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.
Also, how about to use {type: type
?
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.
Will do.
Made the requested changes. Let me know if there's anything else that needs to be addressed. |
Cool, merged, thanks! |
I added a new strategy for AWS SQS-based queues using the shoryuken gem.