hxnodejs-redislock 1.2.0

Externs for the redislock NPM module

Released 2016-02-26.

To install, run:

haxelib install hxnodejs-redislock 1.2.0

See using Haxelib in Haxelib documentation for more information.

Maintainerwaneck
Websitehttps://github.com/proletariatgames/hxnodejs-redislock
Current version1.2.0
StatisticsInstalled 226 times
LicenseMIT
Tags db, js, nodejs, redis

README.md

Haxe/hxnodejs externs for the redislock npm library

Tested using redislock version 1.2.0

Example:

import js.npm.Redislock;

var client = js.npm.Redis.createClient();
var lock = RedisLock.acquire(client, {
  timeout: 20000,
  retries: 3,
  delay: 100
});

lock.acquire('app:feature:lock", function(err) {
  // if (err != null) failed to acquire lock
  
  lock.release(function(err) {
    // if (err != null) failed to release lock
  });
}