resque-slack
v0.0.3
Published
Trigger Slack notifications on job events.
Downloads
6
Maintainers
Readme
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
.