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

    Install

    npm i redis-agenda

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • svbatalov