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 +4 -4
- data/lib/mem_health/job_tracking_middleware.rb +8 -2
- data/lib/mem_health/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6937ace9f7a2407974057577e378f9433bb891c4d848779f80da32e4eb32703d
|
|
4
|
+
data.tar.gz: 70534a9390c32d9e0cdc1e318caee705ca82a3a93042625876978b72ed8c3079
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
data/lib/mem_health/version.rb
CHANGED