resque-failed-job-mailer 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
Overview [](http://travis-ci.org/anandagrawal84/resque_failed_job_mailer)
|
2
|
+
--------
|
3
|
+
|
4
|
+
The resque-failed-job-mailer gem is used to send email along with whole exception backtrace whenever there is any failure in resque job.
|
5
|
+
|
6
|
+
|
7
|
+
Installation
|
8
|
+
------------
|
9
|
+
|
10
|
+
Installation of the plugin can be done using the built in Rails plugin script. Issue the following
|
11
|
+
command from the root of your Rails application:
|
12
|
+
|
13
|
+
$ ./script/rails plugin install git://github.com/anandagrawal84/resque_failed_job_mailer.git
|
14
|
+
|
15
|
+
or add it to your Gemfile:
|
16
|
+
|
17
|
+
gem 'resque-failed-job-mailer', :require => 'resque_failed_job_mailer'
|
18
|
+
|
19
|
+
and run `bundle install` to install the new dependency.
|
20
|
+
|
21
|
+
Usage
|
22
|
+
-----
|
23
|
+
All you need to do is configure ActionMailer for smtp details. Add following configuration file `resque_failed_job_mailer.rb` in `config/initializer` folder
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
Resque::Failure::Notifier.configure do |config|
|
27
|
+
config.from = 'dummy@dummy.com' # from address
|
28
|
+
config.to = 'dummy@dummy.com' # to address
|
29
|
+
end
|
30
|
+
```
|
31
|
+
|
32
|
+
as soon as resque job fail it would send out an email to the configured email address.
|
33
|
+
|
34
|
+
Configuration
|
35
|
+
-------------
|
36
|
+
|
37
|
+
If you want to use your own email mechanism then add following configuration
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
Resque::Failure::Notifier.configure do |config|
|
41
|
+
config.mailer = ActionMailerClass
|
42
|
+
config.mail = ActionMailerMailMethod
|
43
|
+
config.from = 'dummy@dummy.com' # from address
|
44
|
+
config.to = 'dummy@dummy.com' # to address
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
`config.mailer` is any class that extends `ActionMailer::Base`
|
49
|
+
|
50
|
+
`config.mail` is mail in class given above in `config.mailer`
|
@@ -1,13 +1,20 @@
|
|
1
|
+
<p>
|
2
|
+
<strong>Queue: </strong>
|
3
|
+
<%= @notifier.queue %>
|
4
|
+
</p>
|
1
5
|
<p>
|
2
6
|
<strong>Worker: </strong>
|
3
7
|
<%= @notifier.worker %>
|
4
8
|
</p>
|
9
|
+
<% if @notifier.class.include_payload %>
|
10
|
+
<p>
|
11
|
+
<strong>Payload: </strong>
|
12
|
+
<%= @notifier.payload %>
|
13
|
+
</p>
|
14
|
+
<% end %>
|
5
15
|
<strong> Exception: </strong>
|
6
16
|
<p>
|
7
17
|
<%= @notifier.exception %>
|
8
|
-
<
|
9
|
-
|
10
|
-
<%= t %>
|
11
|
-
<br/>
|
12
|
-
<% end %>
|
18
|
+
<pre><% @notifier.exception.backtrace.each do |t| %><%= t %>
|
19
|
+
<% end %></pre>
|
13
20
|
</p>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque-failed-job-mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-01-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
17
|
-
requirement: &
|
17
|
+
requirement: &70198850339160 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70198850339160
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rspec
|
28
|
-
requirement: &
|
28
|
+
requirement: &70198850364800 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70198850364800
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: actionmailer
|
39
|
-
requirement: &
|
39
|
+
requirement: &70198850362860 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70198850362860
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: resque
|
50
|
-
requirement: &
|
50
|
+
requirement: &70198850361780 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70198850361780
|
59
59
|
description: Gem that sends mail in case of resque job failure
|
60
60
|
email:
|
61
61
|
- aagrawal@thoughtworks.com
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- .gitignore
|
68
68
|
- .travis.yml
|
69
69
|
- Gemfile
|
70
|
+
- README.md
|
70
71
|
- Rakefile
|
71
72
|
- lib/resque_failed_job_mailer.rb
|
72
73
|
- lib/resque_failed_job_mailer/alert.html.erb
|
@@ -87,18 +88,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
88
|
- - ! '>='
|
88
89
|
- !ruby/object:Gem::Version
|
89
90
|
version: '0'
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
hash: 994557905120790897
|
93
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
92
|
none: false
|
95
93
|
requirements:
|
96
94
|
- - ! '>='
|
97
95
|
- !ruby/object:Gem::Version
|
98
96
|
version: '0'
|
99
|
-
segments:
|
100
|
-
- 0
|
101
|
-
hash: 994557905120790897
|
102
97
|
requirements: []
|
103
98
|
rubyforge_project: resque-failed-job-mailer
|
104
99
|
rubygems_version: 1.8.12
|