Skip to content

Commit

Permalink
chore: add logs on schedule lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielforster committed Jan 23, 2024
1 parent 0c9e7c9 commit d5b6933
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scraper/ports/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,17 @@ export async function run () {
InvocationType: 'RequestResponse',
});

console.log("payload to string", Payload?.toString())
console.log("payload", Payload)

const json = JSON.parse(Payload?.toString() || "{}") as { body: string };

console.log("JSOn", json)

const places = JSON.parse(json.body ?? "[]");

console.log("places", places)

await Promise.all(places.map(async (place: any) => {
await lambdaScraper.invoke({
FunctionName: 'scraper-api-processor',
Expand Down

0 comments on commit d5b6933

Please sign in to comment.