406672c16b6f3d6bb97a014a4ee1721a2d51ac93
All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 13s
CI/CD Pipeline - Apartment API / Run Tests (pull_request) Successful in 9m47s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Successful in 2s
CI/CD Pipeline - Apartment API / Run Linting (pull_request) Successful in 9m37s
CI/CD Pipeline - Apartment API / Build & Push Image (pull_request) Has been skipped
CI/CD Pipeline - Apartment API / Deploy to Production (pull_request) Has been skipped
Add insertPrices() to scraperService that performs bulk upsert of daily unit price records to the prices collection. Key behaviors: - Uses bulkWrite with updateOne/upsert ops for atomic batch writes - Compound key (unit_code + date_checked) ensures idempotent re-runs - Filters out units with null prices before writing - Stores price, last_updated, and data_source fields per record - Uses ordered:false for parallel write performance - Logs warnings for empty/all-null input without hitting the database - Propagates bulkWrite errors with detailed logging Includes 30 tests covering filtering, upsert behavior, composite key logic, field validation, idempotency, error handling, and logging.
Description
No description provided
Languages
JavaScript
97.8%
HTML
2.1%