0.0.3 • Published 8 years ago

resque-slack v0.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

resque-slack

A small node-resque plugin that triggers Slack notifications on events in the job lifecycle.

Installation

$ npm install resque-slack

Usage

var jobs = {
  add: {
    perform: function(a, b, callback) {
      var answer = a + b;
      return callback(null, answer);
    },
    plugins: [require('resque-slack')],
    pluginOptions: {
      resqueSlack: {
        // Set your webhook url from Slack:
        webhook: 'https://hooks.slack.com/123',
        // Then set the event hook(s):
        before_enqueue: true,
        after_perform: true
      }
    }
  }
};

The available event hooks are: before_enqueue, after_enqueue, before_perform and after_perform.