-
-
Save brandon-fryslie/ac9ec9d536d7794c2601 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
let startIndex = 0; | |
const pageSize = 200; | |
let promises = []; | |
while (startIndex < watches.length) { | |
promises.push(AlmApi.query('/artifact/', { | |
query: buildUUIDQuery(uuids.slice(startIndex, startIndex + pageSize)), | |
fetch: fetchFields, | |
pagesize: pageSize | |
})); | |
startIndex += pageSize; | |
} | |
return Promise.all(promises).then((responses) => { | |
responses = _(responses).pluck('results').flatten().value(); | |
// flattened responses | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment