rails_band 0.8.1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/rails_band/active_job/event/enqueue_all.rb +18 -0
- data/lib/rails_band/active_job/log_subscriber.rb +5 -0
- data/lib/rails_band/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 701f0145b497d440d86c0d184c83369e3be51930e83d83924b2b906c0656f9ed
|
4
|
+
data.tar.gz: a8622e602a198d831f9e7b5c8621e6853b3ed1b65ecd396a7f4d352693823c5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e305b382c73f079434911ea4c379ba9137b47dface3e89e6670df649e4165210328a0d0855de33ad9b5b8db0d76b4670383159f4df7ed58ec2131b82649880a7
|
7
|
+
data.tar.gz: 7b68379f4452d9057f1bfda12c16efd85ff151de8a1d6a170610f8ba0b303769455c24a70695ca3759a9f91d5e61262d3dd90dc83071da40f1f49be35f54cda4
|
data/README.md
CHANGED
@@ -125,6 +125,7 @@ These are Rails Instrumentation API hooks supported by this gem so far.
|
|
125
125
|
| [`perform.active_job`](https://guides.rubyonrails.org/active_support_instrumentation.html#perform-active-job) | ✅ |
|
126
126
|
| [`retry_stopped.active_job`](https://guides.rubyonrails.org/active_support_instrumentation.html#retry-stopped-active-job) | ✅ |
|
127
127
|
| [`discard.active_job`](https://guides.rubyonrails.org/active_support_instrumentation.html#discard-active-job) | ✅ |
|
128
|
+
| [`enqueue_all.active_job`](https://edgeguides.rubyonrails.org/active_support_instrumentation.html#enqueue-all-active-job) | ✅ |
|
128
129
|
|
129
130
|
### Action Cable
|
130
131
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RailsBand
|
4
|
+
module ActiveJob
|
5
|
+
module Event
|
6
|
+
# A wrapper for the event that is passed to `enqueue.active_job`.
|
7
|
+
class EnqueueAll < BaseEvent
|
8
|
+
def adapter
|
9
|
+
@adapter ||= @event.payload.fetch(:adapter)
|
10
|
+
end
|
11
|
+
|
12
|
+
def jobs
|
13
|
+
@jobs ||= @event.payload.fetch(:jobs)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'rails_band/active_job/event/enqueue_at'
|
4
|
+
require 'rails_band/active_job/event/enqueue_all'
|
4
5
|
require 'rails_band/active_job/event/enqueue'
|
5
6
|
require 'rails_band/active_job/event/enqueue_retry'
|
6
7
|
require 'rails_band/active_job/event/perform_start'
|
@@ -42,6 +43,10 @@ module RailsBand
|
|
42
43
|
consumer_of(__method__)&.call(Event::Discard.new(event))
|
43
44
|
end
|
44
45
|
|
46
|
+
def enqueue_all(event)
|
47
|
+
consumer_of(__method__)&.call(Event::EnqueueAll.new(event))
|
48
|
+
end
|
49
|
+
|
45
50
|
private
|
46
51
|
|
47
52
|
def consumer_of(sub_event)
|
data/lib/rails_band/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_band
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka Kamei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/rails_band/action_view/log_subscriber.rb
|
74
74
|
- lib/rails_band/active_job/event/discard.rb
|
75
75
|
- lib/rails_band/active_job/event/enqueue.rb
|
76
|
+
- lib/rails_band/active_job/event/enqueue_all.rb
|
76
77
|
- lib/rails_band/active_job/event/enqueue_at.rb
|
77
78
|
- lib/rails_band/active_job/event/enqueue_retry.rb
|
78
79
|
- lib/rails_band/active_job/event/perform.rb
|
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
134
|
- !ruby/object:Gem::Version
|
134
135
|
version: '0'
|
135
136
|
requirements: []
|
136
|
-
rubygems_version: 3.4.
|
137
|
+
rubygems_version: 3.4.10
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
140
|
summary: Easy-to-use Rails Instrumentation API
|