Dudemullet / ctq-redis-module

A cancellable timeout queue for Redis
4 stars 0 forks source link
queue redis redis-module redis-server

CTQ

This module is still very much in beta, I'm trying to get all ther persistance mechanisms working with both AOF and snapshots before we can get a definitive 1.0

Installing

Usage

2 main methods

ctq.add

Takes in 4 parameters

Examples

ctq.add myKey value list 10

This will add value as a message to the list after 10 seconds.

ctq.cancel

Takes in 1 parameters, returns OK if key was able to be deleted. nil if the key was not found.

Examples

ctq.add myKey myValue list 60
ctq.cancel myKey

This will delete the message at myKey and it will no longer be added to list. Note, cancel needs to be run before the 60 seconds expire.