delayed-plugins-raven 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/delayed-plugins-raven.rb +1 -16
- data/lib/delayed-plugins-raven/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: 510d9ad154ecf812d69636bf14411ed9371fdd8a
|
4
|
+
data.tar.gz: 32a8f245505374f8973dd7743df615bf295b8fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 568b2b73d59a534bd000ef4a35ddeb29cba537969aa359cae7186e6a841c0f6f514de1f156c47c7d78706426918be88279dec6db1322ed2e824ff7733f7d7ddf
|
7
|
+
data.tar.gz: 6686dc7b2dcaf92235994cc24a69e912ecb2fd8400a61c9bb863aa4e1f40e45cfb22cec75b6e9f11cd8fd6450d5c788df89c627ea297739178afe053aa74b7f2
|
@@ -11,7 +11,7 @@ module Delayed::Plugins::Raven
|
|
11
11
|
begin
|
12
12
|
::Raven.capture_exception(error, {
|
13
13
|
configuration: ::Delayed::Plugins::Raven.configuration,
|
14
|
-
extra: { delayed_job:
|
14
|
+
extra: { delayed_job: job.as_json }
|
15
15
|
})
|
16
16
|
rescue Exception => e
|
17
17
|
Rails.logger.error "Raven logging failed: #{e.class.name}: #{e.message}"
|
@@ -19,20 +19,6 @@ module Delayed::Plugins::Raven
|
|
19
19
|
end
|
20
20
|
super if defined?(super)
|
21
21
|
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def get_job_json(job)
|
26
|
-
json = job.as_json["job"]
|
27
|
-
json["handler"] = trim_lines(json["handler"], ::Delayed::Plugins::Raven.max_handler_lines)
|
28
|
-
json["last_error"] = trim_lines(json["last_error"], ::Delayed::Plugins::Raven.max_error_lines)
|
29
|
-
json
|
30
|
-
end
|
31
|
-
|
32
|
-
def trim_lines(string, limit)
|
33
|
-
return string unless limit
|
34
|
-
string.lines.to_a.map(&:strip).slice(0, limit).join("\n") if string.present?
|
35
|
-
end
|
36
22
|
end
|
37
23
|
|
38
24
|
callbacks do |lifecycle|
|
@@ -46,7 +32,6 @@ module Delayed::Plugins::Raven
|
|
46
32
|
|
47
33
|
class << self
|
48
34
|
attr_accessor :configuration
|
49
|
-
attr_accessor :max_handler_lines, :max_error_lines
|
50
35
|
|
51
36
|
def configure
|
52
37
|
@configuration = ::Raven::Configuration.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed-plugins-raven
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Qiushi He
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-02-
|
13
|
+
date: 2014-02-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sentry-raven
|