restash 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +3 -0
- data/lib/resque/failure/logstash.rb +7 -5
- data/lib/restash/conf.rb +1 -1
- data/lib/restash/version.rb +1 -1
- metadata +19 -19
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDZmZmQ5ZTkyNjcwOTAxYjFjYjI2ZmJmYjYyOTk0NjMzZjQ2YTBmOQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 45a7178a2e281fa8a335031af9f3685378a0650b
|
4
|
+
data.tar.gz: 6490f1665ac13114250cda5202a4ebe49e638b2f
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
YjFkNWQwNmQxMjNkYjY3MzkwMzA5NGNiOTNjNjFkZWI0NjRlNzk2ZGZlZWIy
|
11
|
-
MDM4YTdlMGMzMTkyYzYxMTNiMTU0YTc2NjY2OTNkZWUyYjY3MGI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
Njg1ZmE0NDU0ZDJhOGY3OTdkZDZkMmEyMTYyZDk5NmNjOTVhODkxYzNlNDUz
|
14
|
-
MGFkODhmNzcyNWE0OWU0ZWJkYjdmMGI0M2JmNTZkYzhlMTM2YTI4NGU4ZWYx
|
15
|
-
MTU1YTdiYzMwMmVlNjQ1YjFmOTJhNGU2MTVkZDQ5MDNlNWFjNmI=
|
6
|
+
metadata.gz: f8516b78cd619bdd9fbfa551b7579da9caa98db3cb2f04f8f65c8582471afdd4a87a87047538f8ca832fbaed2d837660f635521d0f5c54949653af0e18cff0a6
|
7
|
+
data.tar.gz: 87f0e2b72d0d7c2d680825be944f4b68c99dd05684fae8d6e8f4ce02efd573513c8feff6d781140a7367dbebbe7a23a6697a796b4c6d0154a4d837814a600a20
|
data/README.md
CHANGED
@@ -17,6 +17,9 @@ Restash::Conf.configure do |conf|
|
|
17
17
|
conf.logstash_port = ENV['LOGSTASH_PORT']
|
18
18
|
conf.options = {connect_timeout: timeout1, write_timeout: timeout2, read_timeout: timeout3}
|
19
19
|
conf.extra_options[:some_option_key] = :some_option_value
|
20
|
+
conf.message_mutator = Proc.new do |message|
|
21
|
+
message[:special_line] = message[:backtrace].try(:find) {|line| line.include?('special')}
|
22
|
+
end
|
20
23
|
end
|
21
24
|
```
|
22
25
|
|
@@ -8,11 +8,13 @@ module Resque
|
|
8
8
|
def save
|
9
9
|
begin
|
10
10
|
message = { exception: exception.to_s,
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
exception_class: exception.class.to_s,
|
12
|
+
backtrace: exception.backtrace,
|
13
|
+
worker: worker.to_s,
|
14
|
+
queue: queue,
|
15
|
+
payload: payload,
|
16
|
+
tags: [:resque_failure] }
|
17
|
+
Restash::Conf.message_mutator.call(message) if Restash::Conf.message_mutator
|
16
18
|
message.merge! Restash::Conf.extra_options
|
17
19
|
Restash::Conf.logger.write(message.to_json)
|
18
20
|
rescue => e
|
data/lib/restash/conf.rb
CHANGED
data/lib/restash/version.rb
CHANGED
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ariel Cabib
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.12'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.12'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: resque
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: json
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: tcp_timeout
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
description: Logs Resque failures to Logstash
|
@@ -101,9 +101,9 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
-
- .gitignore
|
105
|
-
- .rspec
|
106
|
-
- .travis.yml
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
107
107
|
- Gemfile
|
108
108
|
- LICENSE.txt
|
109
109
|
- README.md
|
@@ -126,12 +126,12 @@ require_paths:
|
|
126
126
|
- lib
|
127
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
|
-
- -
|
134
|
+
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|