0.0.1 • Published 9 years ago

redis-agenda v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

redis-agenda

Distribute agenda events via Redis pub/sub.

Example

var Agenda = require('redis-agenda');
var agenda = new Agenda({...});
agenda.on('redis:complete', function (job) {
	// job actually equals to originalJob.attrs

	// This function gets called event when
	// original 'complete' event occured on
	// different worker.
});

You may also emit custom event on agenda instance:

agenda.emit('custom event', {some: 'data'});

and listen to it (with prefix redis:) in the same or in another instance(s):

agenda.on('redis:custom event', function (data) {
	console.log(data); // => {some: 'data'}
});

License

MIT