relock
v1.0.2
Published
distributed lock bases on redis
Downloads
7
Readme
ReLock
simple distributed lock base on redis
API
var resource = "resource_lock";
var client = require('redis').createClient(port, host);
var lock;
Relock
.lock(resource, ttl, client)
.then(function(key) {
lock = key;
...
})
Relock
.unlock(resource, lock, client)
.then(function(result) {
...
})