red_cross 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80bda9d16c3fb5657294a309a3155d8b60b8ee87
4
- data.tar.gz: 85de83d6ebf37a40ee274a4453077a05b43404de
3
+ metadata.gz: 4e4b4f06dcded53b8790298ea43dee10c413b3dd
4
+ data.tar.gz: 90d0a731c01730e2cdb90579faca4ce04d474923
5
5
  SHA512:
6
- metadata.gz: 98a1d127b53dc23f2884c2ec2ea90b98a1bdd512f1bde0d8389f3210101400fc87c82248be169e2d605ac41e61b4ead81f58ef0a15d26737ae997ae6396d6451
7
- data.tar.gz: e4ad913bfde2e20231df749c4aed78e00a14968c59fecbbb2795018e90a4149d7927fe3078018c7ae0bf19c4baa88dfac1d9978d422e1a3c723edd5e2811dac0
6
+ metadata.gz: 96cf40eb35b443ed47b96eb376a709377cb506ce69e853ee898ac1ebd3441fc5b328185391af90abeb281f5f99ede562e87259955bab525f354d8702ded25c55
7
+ data.tar.gz: caa5f4ff5d91def610a390f7800622e0440b3fa230d79116df100311acb65669a18c4e016425a6e8b1a5d1e2a8a236a22f87ad207dc989f8c9b592b20553e02b
@@ -39,9 +39,9 @@ module Resque
39
39
  send_metrics('performed', *args)
40
40
  end
41
41
 
42
- def on_failure_send_monitor_data(e, *args)
42
+ def on_failure_send_monitor_data(*args)
43
43
  @job_end_time = Time.now()
44
- send_metrics('failed', *args, e)
44
+ send_metrics('failed', *args)
45
45
  end
46
46
 
47
47
  def default_event_properties(*args)
@@ -56,10 +56,12 @@ module Resque
56
56
  end
57
57
  end
58
58
 
59
- def send_metrics(job_status, *args, e = nil)
59
+ def send_metrics(job_status, *args)
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
+ if args.is_a?(Array) && args[0].is_a?(Exception)
63
+ @event_properties[:exception] = args.shift.class.to_s
64
+ end
63
65
  ::RedCross.monitor_track(event: 'resque', properties: @event_properties.merge({ job_status: job_status }))
64
66
  end
65
67
  end
@@ -1,3 +1,3 @@
1
1
  module RedCross
2
- VERSION = '0.2.13'
2
+ VERSION = '0.2.14'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: red_cross
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - ronbarab