Skip to content

Commit

Permalink
Merge pull request #89 from waynezhang/fix-mass-request
Browse files Browse the repository at this point in the history
Limit request number to avoid mass request
  • Loading branch information
mono0926 authored Aug 3, 2018
2 parents 14bcf93 + c853026 commit 1ffea0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/LicensePlistCore/Entity/PlistInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ struct PlistInfo {
guard let githubLibraries = githubLibraries else { preconditionFailure() }

let queue = OperationQueue()
queue.maxConcurrentOperationCount = 10
let carthageOperations = githubLibraries.map { GitHubLicense.download($0) }
queue.addOperations(carthageOperations, waitUntilFinished: true)
githubLicenses = carthageOperations.map { $0.result?.value }.flatMap { $0 }
Expand Down

0 comments on commit 1ffea0f

Please sign in to comment.