ezlog 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a13352755faf442588dbe56813e8cc770f94c088455497f98b7d826ced91ff10
4
- data.tar.gz: ea44535055ff6b6d33809e826113a4121277dc9c7e74faaf82f7516e40301daa
3
+ metadata.gz: 6954ed2d852dfdb1c6c0f61674fc8e7a93f5886ff7ad419d6ad389ca64cee50a
4
+ data.tar.gz: 3fcf6b956d3fa834e08b22136b18004db4fb87efc7db04e709ff200fb5d5943f
5
5
  SHA512:
6
- metadata.gz: 02e113881e70f1b46123156b2cad9682100a7006b822f5c93a18200be3aba8de8cc852b904591f505236ca1d867f3eb725fd9a310fdef7e395ccf7fe85c8ee2c
7
- data.tar.gz: 98ef1ef8fc146fd662354db14ae07febbfde6296b4545bc5aace9776164648052fd497953f68b5e7ddca3e26d99e30466bd4f10a24d0632e26f60cbbb97915ee
6
+ metadata.gz: 01701da962f2d69c5128d91aa64680c2e391fbae3280e290902c392323b9a57e8683f734def0257b975547f4f06d983817fd139b1ae8c8a807fcbff924f91a04
7
+ data.tar.gz: 8f477d3320f1509b75cc8ff31a085e3fbaee01da9b4bacdad3c563689ff5b060d0e6d06676d8315f3eb7472ed992f966b45d443d63444a50f04f69d7c90d40c9
@@ -1,3 +1,13 @@
1
+ ### 0.5.0 (2019-09-11)
2
+
3
+ [Full Changelog](https://github.com/emartech/ezlog/compare/v0.4.0...v0.5.0)
4
+
5
+ * Features & enhancements
6
+ * Support [Sidekiq 6](https://github.com/mperham/sidekiq) logging
7
+ * Log the underlying (real) job class when using [Sidekiq](https://github.com/mperham/sidekiq) wrapped into
8
+ [Active Job](https://github.com/rails/rails/tree/master/activejob)
9
+
10
+
1
11
  ### 0.4.0 (2019-09-06)
2
12
 
3
13
  [Full Changelog](https://github.com/emartech/ezlog/compare/v0.3.5...v0.4.0)
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "bundler", "~> 2.0"
28
28
  spec.add_development_dependency "rake", "~> 10.0"
29
29
  spec.add_development_dependency "rspec", "~> 3.0"
30
- spec.add_development_dependency "sidekiq", "~> 5.0"
30
+ spec.add_development_dependency "sidekiq", ">= 5.0"
31
31
  spec.add_development_dependency "sequel", "~> 5.0"
32
32
  spec.add_development_dependency "actionpack", "~> 5.0"
33
33
  spec.add_development_dependency "activerecord", "~> 5.0"
@@ -12,7 +12,7 @@ module Ezlog
12
12
  {
13
13
  jid: job['jid'],
14
14
  queue: job['queue'],
15
- worker: job['class'],
15
+ worker: job_class(job),
16
16
  created_at: job['created_at'],
17
17
  enqueued_at: job['enqueued_at'],
18
18
  run_count: (job['retry_count'] || -1) + 2
@@ -28,7 +28,11 @@ module Ezlog
28
28
  end
29
29
 
30
30
  def method_parameters_of(job)
31
- Kernel.const_get(job['class'].to_sym).instance_method(:perform).parameters
31
+ Kernel.const_get(job_class(job).to_sym).instance_method(:perform).parameters
32
+ end
33
+
34
+ def job_class(job)
35
+ job['wrapped'] || job['class']
32
36
  end
33
37
  end
34
38
  end
@@ -18,6 +18,10 @@ module Ezlog
18
18
  end
19
19
  end
20
20
 
21
+ def with_job_hash_context(_job_hash, &_block)
22
+ yield
23
+ end
24
+
21
25
  private
22
26
 
23
27
  def benchmark
@@ -1,3 +1,3 @@
1
1
  module Ezlog
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zoltan Ormandi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-06 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: sidekiq
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '5.0'
76
76
  type: :development
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: '5.0'
83
83
  - !ruby/object:Gem::Dependency