Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@h3poteto I should have tested #269 more, it's always showing the warning message, because of this https://github.com/phstc/shoryuken/blob/master/lib/shoryuken.rb#L29.
But TBH, I'm strongly considering removing this
DEPRECATION
warning. I don't see the issue with setting it in theshoryuken.yml
, otherwise I would need to write a class only to initialize it in aconfigure_server
block, also some people have ashoryuken.yml
in a server folder that they move during the deploy process to theapp/config
, WDYT?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.
@phstc @h3poteto
I think shoryuken 's aws related config should be defined in the initializer. Because if the configuration of aws is in shoryuken.yml, the initialize process of shoryuken becomes too complicated.
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.
Sorry, I missed this https://github.com/phstc/shoryuken/blob/master/lib/shoryuken.rb#L29 .
Thank you for your fix.
I recommend use
configure_server
andconfigure_client
in initializer. So, I add thisDEPRECATION
warning.Now, Shoryuken has multipe configure methods of aws.
First, worker side has two ways:
shoryuken.yml
configure_client
block in initializerSecond, producer side has a few ways:
AWS_ACCESS_KEY
andAWS_SECRET_ACCESS_KEY
~/.aws/credentials
configure_server
block in initializerI thought this situation was complicated.
And I thought that setting aws in separate place is not good.
But, It may not be bad for multiple methods to exist, if we can control.
What do you think?
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.
@h3poteto @suzan2go I have a project which I don't use Rails, I use a standalone version of Shoryuken. So for this project, I would need to create a Ruby class, and make sure it's the first file required in the
-r
to set the AWS config. Also, there are still some people that during the deploy process (capistrano), copy ashoryuken.yml
to the project's dir, for this people they would need to copy a class instead, which feels bad or change the way they initialize AWS.Unless I'm missing something I think the only thing it requires is this:
https://github.com/phstc/shoryuken/blob/master/lib/shoryuken/environment_loader.rb#L55-L58
WDYT?
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.
It seems that Sidekiq does not allow configuring Redis in the
sidekiq.yml
. Alright, maybe we don't need to then.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.
I answer this:
I thought that if people use pure Ruby class to Shoryuken worker (not Rails), please write
configure_client
in top of the Ruby file.This way is same as Sidekiq, it presented here: https://www.youtube.com/watch?v=bfPb1zD91Rg&index=1&list=PLjeHh2LSCFrWGT5uVjUuFKAcrcj5kSai1