MCPcopy Create free account
hub / github.com/serverless/examples / runner

Function runner

aws-node-fullstack/frontend/src/DemoApp.js:201–209  ·  view source on GitHub ↗
(cb)

Source from the content-addressed store, hash-verified

199
200 // Runner Function
201 const runner = async (cb) => {
202 let array = []
203 for (let i = 0; i <= invocations; i++) { array.push(i) }
204 for (const item of array) {
205 await callApi()
206 self.setStatus(`Performing API request ${item}/${invocations}...`)
207 }
208 if (cb) return cb()
209 }
210
211 runner(() => {
212 self.setStatus(`Successfully completed ${invocations} requests!`)

Callers 2

generateInvocationsFunction · 0.85
generateRandomErrorFunction · 0.85

Calls 1

callApiFunction · 0.85

Tested by

no test coverage detected