mysql-semaphore

JSON →
library 0.1.1 ·javascript
verified Jun 5, 2026

A semaphore handler for Node.js using MySQL as the coordination backend. Current stable version 0.1.1. No recent releases. Provides lock, unlock, and islocked methods via Promises for clustered Node.js environments where you need to ensure only one instance runs a task (e.g., cron jobs). Key differentiators: simple MySQL-based semaphore with no external dependencies beyond mysql package. Known issues: lock name uniqueness is critical to avoid accidental unlocking across applications; no automatic lock cleanup.