red_cross 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/red_cross/resque/plugins/red_cross_monitor.rb +3 -2
- data/lib/red_cross/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80bda9d16c3fb5657294a309a3155d8b60b8ee87
|
4
|
+
data.tar.gz: 85de83d6ebf37a40ee274a4453077a05b43404de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98a1d127b53dc23f2884c2ec2ea90b98a1bdd512f1bde0d8389f3210101400fc87c82248be169e2d605ac41e61b4ead81f58ef0a15d26737ae997ae6396d6451
|
7
|
+
data.tar.gz: e4ad913bfde2e20231df749c4aed78e00a14968c59fecbbb2795018e90a4149d7927fe3078018c7ae0bf19c4baa88dfac1d9978d422e1a3c723edd5e2811dac0
|
@@ -41,7 +41,7 @@ module Resque
|
|
41
41
|
|
42
42
|
def on_failure_send_monitor_data(e, *args)
|
43
43
|
@job_end_time = Time.now()
|
44
|
-
send_metrics('failed', *args)
|
44
|
+
send_metrics('failed', *args, e)
|
45
45
|
end
|
46
46
|
|
47
47
|
def default_event_properties(*args)
|
@@ -56,9 +56,10 @@ module Resque
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
def send_metrics(job_status, *args)
|
59
|
+
def send_metrics(job_status, *args, e = nil)
|
60
60
|
default_event_properties(*args)
|
61
61
|
@event_properties[:fields][:run_time] = ((@job_end_time - @job_start_time)*1000).to_i if %w(performed failed).include? job_status
|
62
|
+
@event_properties[:exception] = e.class.name unless e.nil?
|
62
63
|
::RedCross.monitor_track(event: 'resque', properties: @event_properties.merge({ job_status: job_status }))
|
63
64
|
end
|
64
65
|
end
|
data/lib/red_cross/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red_cross
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronbarab
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: analytics-ruby
|