(event, context)
| 2 | import { LambdaWarmerPayload } from './type'; |
| 3 | |
| 4 | export const handler: Handler<LambdaWarmerPayload> = async (event, context) => { |
| 5 | const { url, concurrency } = event; |
| 6 | |
| 7 | console.log(`warming ${url} with concurrency ${concurrency}...`); |
| 8 | |
| 9 | await Promise.all( |
| 10 | new Array(concurrency).fill(0).map(async () => { |
| 11 | await fetch(url); |
| 12 | }) |
| 13 | ); |
| 14 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected