SCRAPE-31: Add scraper indexes and validation collections #30
Reference in New Issue
Block a user
No description provided.
Delete Branch "scraper/indexes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Added createScraperIndexes() for scraper_runs collection with compound index on status+startedAt and descending index on startedAt. Changed default collection names from production (units_migration_test, unit_prices_migration_test) to validation (units_scraper, unit_prices_scraper) for parallel validation. Updated all scraper test files.
❌ Changes Requested
The
createScraperIndexesfunction contains aconsole.logstatement in production code. It should use the logger pattern consistent with the rest of the service.Issues:
services/scraperService.js:762
Remove
console.log('Scraper indexes created successfully'). Production code must not useconsole.log. Either accept aloggerparameter (consistent with all other functions in this service likerecordScraperRun(db, runData, logger)) and calllogger.info(...), or remove the log statement entirely. The function signature should becreateScraperIndexes(db, logger)to match the existing pattern.