MCPcopy Create free account
hub / github.com/decaporg/decap-cms / batchRequests

Function batchRequests

cypress/plugins/github.js:142–148  ·  view source on GitHub ↗
(items, batchSize, func)

Source from the content-addressed store, hash-verified

140}
141
142async function batchRequests(items, batchSize, func) {
143 while (items.length > 0) {
144 const batch = items.splice(0, batchSize);
145 await Promise.all(batch.map(func));
146 await new Promise(resolve => setTimeout(resolve, 2500));
147 }
148}
149
150async function resetOriginRepo({ owner, repo, tempDir }) {
151 console.log('Resetting origin repo:', `${owner}/${repo}`);

Callers 2

resetOriginRepoFunction · 0.85
seedGitHubRepoFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected