redis-lock-q
0.0.1 • Public • Published redis-lock-q
A promisified version of redis-lock, which implements a locking primitive using redis in node.js.
Example
Take the redis-lock example
var client = require("redis").createClient(),
lock = require("redis-lock")(client);
lock("myLock", function(done) {
done(function () {
});
});
The redis-lock-q version looks something like this
lock("myLock", function() {
return q.resolve().delay(1000);
}).fin(function() {
});
lock
itself now returns a promise, which is just a proxy for the resolved/rejected promise that your function returned.
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 0.0.1
64
Version History
- VersionDownloads (Last 7 Days)
- 0.0.1
64
Package Sidebar
Install
Weekly Downloads