UNPKG

resque-slack

Version:

Trigger Slack notifications on job events.

36 lines (28 loc) 781 B
# resque-slack A small [node-resque](https://github.com/taskrabbit/node-resque) plugin that triggers [Slack](https://slack.com) notifications on events in the job lifecycle. ## Installation ```sh $ npm install resque-slack ``` ## Usage ```js 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`.