mettric 0.1.7 → 0.1.8
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/mettric/sidekiq_middleware.rb +10 -1
- data/lib/mettric/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed218869bb0e8597d68dba5f9cd801d2a9d85e36
|
4
|
+
data.tar.gz: eb5836650566d49b49c5539a13c50a6eaf3a9b67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edc9987a607439cffc42ae1d0c3eb0f5f3fc5e1ab96a516686977346b05c2129e776a1c90648ff303c1252a4f5f7d9542023fafb2ef840764c7366c17325e198
|
7
|
+
data.tar.gz: 4b3cb8b85087c4399999fb57279f77e887d106e666264f044670c173d1a819a629eb48139d6b18fd020a560b933d03c244ce715d3475aaf9d46ef1516e112119
|
@@ -8,7 +8,7 @@ class Mettric::SidekiqMiddleware
|
|
8
8
|
opts = worker.class.sidekiq_options['mettric']
|
9
9
|
|
10
10
|
# Don't do anything if we're told to skip this class
|
11
|
-
if opts != true
|
11
|
+
if opts != true and opts != nil
|
12
12
|
return yield
|
13
13
|
end
|
14
14
|
|
@@ -19,3 +19,12 @@ class Mettric::SidekiqMiddleware
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
if Kernel.const_defined?(:Sidekiq)
|
24
|
+
Sidekiq.configure_server do |config|
|
25
|
+
config.server_middleware do |chain|
|
26
|
+
chain.add Mettric::SidekiqMiddleware
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
data/lib/mettric/version.rb
CHANGED