Skip to content

Instantly share code, notes, and snippets.

@rayway30419
Created October 5, 2016 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rayway30419/950025ae74812b45dd0ad0e5fffe1934 to your computer and use it in GitHub Desktop.
Save rayway30419/950025ae74812b45dd0ad0e5fffe1934 to your computer and use it in GitHub Desktop.
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