memhealth 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d288c6c8d71c95a79475880eb7bcb728ff20b78cde21b93472067180f5dc39d
4
- data.tar.gz: 2428b18f52b396c83ada890c89d288d1202d918b90545d965b7451fc432220e0
3
+ metadata.gz: 6937ace9f7a2407974057577e378f9433bb891c4d848779f80da32e4eb32703d
4
+ data.tar.gz: 70534a9390c32d9e0cdc1e318caee705ca82a3a93042625876978b72ed8c3079
5
5
  SHA512:
6
- metadata.gz: 1ac3ee0f570d6bcd08f87ccdbcf230b9e5c025dabc670bb56cfca69eec2d33a93c7be43e4b333577a8e297f0ff01156c350bed2e8abc7d348c18e005ffde5c5c
7
- data.tar.gz: 84785f28c3b0d897226ec84ce2f08aab36de4ce8425da582b11061a815740b14d05970de717bcbf60d2a84f3669e630a146ce7214ba08ab677e51e4b5c581d6c
6
+ metadata.gz: 2d10a9cee1ea390ee7b55a121fdc94f4f38086eb5ab1cdbad53e1cbf71d2e1b7355d8689d30f7774ce494df25c261e5f27cfce357d594255d279e5d9149307c9
7
+ data.tar.gz: 6aea016d4c158e2554317c531a44314bf650b87623bea24b604e252cf74b3bc3cb10339b5a6209c7d952e2c494270159c6d120f4b9f7a1f74c853e9429dae86a
@@ -30,8 +30,14 @@ module MemHealth
30
30
  private
31
31
 
32
32
  def extract_job_class(worker, job)
33
- # For ActiveJob jobs, extract the actual job class from the wrapper
34
- if worker.class.name == 'ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper'
33
+ # For ActiveJob jobs, extract the actual job class from the wrapper.
34
+ # Detect via the payload's "wrapped" key rather than the wrapper's class
35
+ # name: on Sidekiq 7+/Rails 7.1+ the old
36
+ # ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper constant is just an
37
+ # alias whose #name resolves to "Sidekiq::ActiveJob::Wrapper", so the old
38
+ # string comparison never matched and every job was mislabeled as the
39
+ # wrapper. The "wrapped" key is what the sibling extractors key off too.
40
+ if job['wrapped'] # ActiveJob
35
41
  job['wrapped'] || job['args']&.first&.dig('job_class') || worker.class.name
36
42
  else
37
43
  worker.class.name
@@ -1,3 +1,3 @@
1
1
  module MemHealth
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Klemen Nagode