delayed-plugins-reporting 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/delayed-plugins-reporting.gemspec +2 -0
- data/lib/delayed-plugins-reporting.rb +4 -0
- data/lib/delayed-plugins-reporting/context.rb +5 -0
- data/lib/delayed-plugins-reporting/job_listener.rb +6 -0
- data/lib/delayed-plugins-reporting/version.rb +6 -4
- metadata +16 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd1095a9e58b3ed73f064dd9e5cfebae9d0249ea
|
4
|
+
data.tar.gz: 35943fc24de7b6bb78d5a13723c716b2cad86ac6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5d7689b83a82771c05dd51934701cf745d0d9f05db0cd396bfb284d7d60954c39fc32162f691a18e0293fc42026e31d29bb289e4895268cd597f511455b15bb
|
7
|
+
data.tar.gz: d467975726223ff169330754da8d7ebb9c9452cbe18f786891b4d522417e120221553e0a41f3785b1dfb4d2cf098eea357e1ae2e4ed685420072465706ea82fa
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Delayed::Plugins::Reporting
|
2
2
|
|
3
|
+
[![Code Climate](https://codeclimate.com/github/crowdworks/delayed-plugins-reporting/badges/gpa.svg)](https://codeclimate.com/github/crowdworks/delayed-plugins-reporting)
|
4
|
+
|
3
5
|
A [Delayed::Job](https://github.com/collectiveidea/delayed_job) plugin to report lifecycle events like job invocations,
|
4
6
|
failures, retries to log files or monitoring services like Datadog.
|
5
7
|
|
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
spec.add_dependency('delayed_job')
|
21
|
+
|
20
22
|
spec.add_development_dependency "bundler", "~> 1.7"
|
21
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
22
24
|
end
|
@@ -10,6 +10,10 @@ class Delayed::Plugins::Reporting < ::Delayed::Plugin
|
|
10
10
|
lifecycle.after(:failure) do |worker, job|
|
11
11
|
context.after_failure(worker, job)
|
12
12
|
end
|
13
|
+
|
14
|
+
lifecycle.before(:perform) do |worker, job|
|
15
|
+
context.before_perform(worker, job)
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
@@ -17,6 +17,11 @@ class Delayed::Plugins::Reporting
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def before_perform(worker, job)
|
21
|
+
return if job.attempts.zero?
|
22
|
+
listener.job_retried(job)
|
23
|
+
end
|
24
|
+
|
20
25
|
class << self
|
21
26
|
def create(reporter: {}, formatter: {}, listener: {})
|
22
27
|
formatter_options = formatter.dup
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed-plugins-reporting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusuke KUOKA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: delayed_job
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,4 +97,3 @@ specification_version: 4
|
|
83
97
|
summary: A Delayed::Job plugin to report lifecycle events to log files or monitoring
|
84
98
|
services, etc.
|
85
99
|
test_files: []
|
86
|
-
has_rdoc:
|