redis-agenda

0.0.1 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    0

Package Sidebar

Install

npm i redis-agenda

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • svbatalov