ioredis-timer
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Build Status Coverage Status MIT license

Ioredis Timer

This module allows you do settimeout in cluster mode.

Usage

import * as Redis from 'ioredis';
import { Timer } from 'ioredis-timer';
 
const redis = new Redis({
  host: 'localhost',
  port: 6379,
});
const timer = new Timer(redis);
 
timer.on('delivery', async id => {
  console('do delevery here');
  timer.finish('delivery', id);
});
timer.setTimeout('delivery', 1000);
 

Package Sidebar

Install

npm i ioredis-timer

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

14.1 kB

Total Files

7

Last publish

Collaborators

  • kuyoonjo