npm install ioredfour --save
var Lock = ;var testLock =// Can also be an `Object` of options to pass to `new Redis()`// , or an existing// instance of `ioredis` (if you want to reuse one connection, though this// module must create a second).redis: 'redis://localhost:6379'namespace: 'mylock';var id = Math;var firstlock;// First, acquire the lock.testLock;// Another server might be waiting for the lock like this.testLock;// When the original lock is released, `waitAcquireLock` is fired on the other server.;
We welcome pull requests! Please lint your code.
- 1.0.2-ioredis Forked from redfour and switch node_redis with ioredis
- 1.0.2 Don't use
instanceofto determine if the
redisconstructor option is of type
- 1.0.1 Fix issue where you could only pass in a Redis connection URI.
- 1.0.0 Initial release.
Shortened (and easier to pronouce) version of "Redis Semaphore"