Skip to content

fix: lambda wait until network idle#52

Merged
Perry2004 merged 1 commit intomainfrom
fix/broken-lambda
Oct 13, 2025
Merged

fix: lambda wait until network idle#52
Perry2004 merged 1 commit intomainfrom
fix/broken-lambda

Conversation

@Perry2004
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 13, 2025 19:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves the reliability of web scraping by replacing timeout-based waiting with network idle detection in a Playwright-based Lambda function. The changes enhance logging visibility and ensure proper dependency organization.

  • Replaced fixed timeouts with page.waitForLoadState("networkidle") for more reliable content loading detection
  • Added comprehensive console logging for better debugging and monitoring
  • Moved @sparticuz/chromium from devDependencies to dependencies for proper Lambda deployment

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
scripts/src/main.ts Replaced timeout waits with network idle detection and added logging for page load states and image counts
scripts/src/lambda-handler.ts Enhanced error handling and result logging for better Lambda function observability
scripts/package.json Moved chromium dependency to production dependencies for Lambda runtime availability

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Perry2004 Perry2004 merged commit 1753e03 into main Oct 13, 2025
2 checks passed
@Perry2004 Perry2004 deleted the fix/broken-lambda branch October 13, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants