Created
August 8, 2019 04:52
-
-
Save DamirSvrtan/e4f65f76238f749d5328e83a82c8ed4b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class UserAPI | |
def self.find_by_emails(emails) | |
Parallel.map(emails, in_threads: 10) do |email| | |
UserApi.fetch_user_by_email(email) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment