Resque::Notifier
Resque Notifier is a Resque plugin that sends notifications when a job fails.
Requirements
Ruby 2.3.1
Installation
Add this line to your application's Gemfile:
gem 'resque-notifier'
And then execute:
$ bundle
Or install it yourself as:
$ gem install resque-notifier
Usage
This gem activates a notifier when environment variables are set.
example: Slack
RESQUE_HOOK=https://hooks.slack.com/services/<generated_hash>
RESQUE_CHANNEL="#channel-name"
Add the Notifier backend to your existing Resque configuration (config/initializers/resque.rb)
require 'resque/failure/notifier'
Resque::Failure::Multiple.classes = [Resque::Failure::Redis, Resque::Failure::Notifier]
Resque::Failure.backend = Resque::Failure::Multiple
Contributing
- Fork it ( https://github.com/[my-github-username]/resque-notifier/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request