Created
October 5, 2016 01:20
-
-
Save rayway30419/950025ae74812b45dd0ad0e5fffe1934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module A | |
def init_ddb_client | |
Aws::DynamoDB::Client.new | |
end | |
def query params | |
client = init_ddb_client # Exception here | |
# loop for counting | |
end | |
end | |
class B | |
include A # mixin module A | |
end | |
# in sidekiq worker | |
b = B.new | |
params = { | |
# sth... | |
} | |
b.query(params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment