rails_band 0.8.2 → 0.8.4
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: 713aa5bd3f98387dd8ddc12985b66321793e5c6e2b95a9743c4358f58b63c6c2
|
4
|
+
data.tar.gz: c8739cee9be5b13ea9ba6726985ef94515483cc73e22a391319f2580d29eb477
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3cd3683066cea10e7cbefa9df4e62c9a0b8303953969db43002218a2d7893f3958fc249049cda979a26f12fe5d3c240535ff8ba393155c9fb89cd49b531d318
|
7
|
+
data.tar.gz: f7ee796af08d421b834ee63c0f85771f4166cda13e822c4737117c1759b0711bb62a23ac3c58dcc6070227bea121c924dd641074e93f6c115b90e902051cc38d
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yutaka Kamei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-04 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.
|
137
|
+
rubygems_version: 3.5.3
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
140
|
summary: Easy-to-use Rails Instrumentation API
|