1.0.1 • Published 7 years ago

redis-pulse v1.0.1

Weekly downloads
62
License
MIT
Repository
github
Last release
7 years ago

Redis Pulse

npm

Simple redis heartbeat. It will send ping command to connection repeatedly while it is open.

Depends on redis npm package as a peer.

Installation

npm i redis-pulse --save

API

Module is just one method, that will get your connection as an argument and return it.

pulse(redisClient, options)

  • redisClient - any redis client (redis.creteClient() result)
  • options * timeout - time in ms between pings

Example

Just that simple:

const redis = require('redis');
const pulse = require('redis-pulse');

const client = pulse(redis.createClient());