0.0.4 • Published 4 years ago

redis-conductor v0.0.4

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
4 years ago

Redis-Conductor

  • Last tests against master on CircleCI: CircleCI

  • Install with npm install redis-conductor

  • Running several instances of the same process:

const conductor = require('redis-conductor');
//use redis server at 127.0.0.0:6379, db #0
const neighbors = conductor('my-process-name');

//or pass in redis optional options:
//const neighbors = conductor('my-process-name', { host: redisBackend, port: redisPort, dbId: redisDb, authPass: redisPass );

[...]
    if (neighbors.isElectedMaster() !== false) {
	console.log('we know that process is currently our master');
	console.log('exec some task that should not run twice simultaneously');
    } else {
	console.log('There is no spoon');
    }
0.0.4

4 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago