df86a1423c258c5226a2a6cc2119ef2fb8ea05f5
All checks were successful
CI/CD Pipeline - Apartment API / Scan Dependencies (pull_request) Successful in 13s
CI/CD Pipeline - Apartment API / Lint & Test (pull_request) Successful in 38s
CI/CD Pipeline - Apartment API / Send Webhook Notification (pull_request) Successful in 2s
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
Implement a lightweight in-process mutex lock for the scraper job scheduler. This prevents multiple scraper instances from running simultaneously, which could cause duplicate data and race conditions. Exported functions: - acquireLock(jobId): Attempts to acquire the mutex, returns boolean - releaseLock(): Releases the mutex lock - isScraperRunning(): Returns current lock state - getCurrentJobId(): Returns the active job ID or null Includes 19 unit tests covering lock acquisition, release, re-entry prevention, and edge cases.
Description
No description provided
Languages
JavaScript
97.8%
HTML
2.1%