alacrity-rails 0.13.0 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alacrity-rails/probe/active_job.rb +14 -12
- data/lib/alacrity-rails/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: a1acab121cd8bc00a7bcb8a89c5926357e477790
|
4
|
+
data.tar.gz: 44cc21695599f2feb5469baf48587c4656b09d78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00d9a3fa40d0294b50d8a87c5371f41e08e502a6cc3a2f377a4a18786bc58caaf092eb9cb782d8c4d7c938533b06b7ab0428aac62617a9418b5159f47be2f5e7
|
7
|
+
data.tar.gz: acb3b0d407b1579008ab4fb3f75d8a4e3e51cd42ae21d3eb9d7e420329642222b86a85464dccf7e44ba541177028187aa60c186562e0f12324d3b99b0c20ad8f
|
@@ -17,20 +17,22 @@ module AlacrityRails
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
if defined?(ActiveJob)
|
21
|
+
class ::ActiveJob::Base
|
22
|
+
around_perform :alacrity_instrumentor
|
22
23
|
|
23
|
-
|
24
|
+
private
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
26
|
+
def alacrity_instrumentor
|
27
|
+
AlacrityRails::Instrumentor.instrument(
|
28
|
+
type: AlacrityRails::Transaction::Job,
|
29
|
+
data: {
|
30
|
+
worker_class: self.class.to_s,
|
31
|
+
args: @arguments
|
32
|
+
}
|
33
|
+
) do
|
34
|
+
yield
|
35
|
+
end
|
34
36
|
end
|
35
37
|
end
|
36
38
|
end
|