advanced-sneakers-activejob 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1edfa8193fc63efdc88c97b46bf55dddfe0bf062c81915cc32a0935c4621ac7
|
4
|
+
data.tar.gz: 474ee8337a89e4546774190c22c77429687b02b81232a033a32a67213753b2e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a955f43e34ea3128052261fcd03c88d5e20563ab5df37b18bdb5f1ffecdf70c13d659aa70acb382e7d7f4f7e76fd9f1f7a2b1f323e1aadeb107229164258a57c
|
7
|
+
data.tar.gz: 88bed92d02624c64834f87ae62baaa9e43edde9556bf6082c96f0d4021e35da542132a773ccf9c7ce9102a800f63e2ce510e5a1384fcef6e126fbb79a9d1f811
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## Changes Between 0.3.1 and 0.3.2
|
2
|
+
|
3
|
+
### [Add ability to run specified ActiveJob queues consumers](https://github.com/veeqo/advanced-sneakers-activejob/pull/8)
|
4
|
+
|
5
|
+
Sneakers allows to specify consumer classes to run:
|
6
|
+
|
7
|
+
```sh
|
8
|
+
WORKERS=MyConsumer rake sneakers:run
|
9
|
+
```
|
10
|
+
|
11
|
+
Now it works for ActiveJob queues consumers as well:
|
12
|
+
|
13
|
+
```sh
|
14
|
+
WORKERS=AdvancedSneakersActiveJob::MailersConsumer rake sneakers:run
|
15
|
+
```
|
16
|
+
|
1
17
|
## Changes Between 0.3.0 and 0.3.1
|
2
18
|
|
3
19
|
### [Restore Sneakers::Worker::Classes methods](https://github.com/veeqo/advanced-sneakers-activejob/pull/6)
|
@@ -68,5 +68,11 @@ module AdvancedSneakersActiveJob
|
|
68
68
|
|
69
69
|
[parameterized_string, 'consumer'].join('_').classify
|
70
70
|
end
|
71
|
+
|
72
|
+
def const_missing(name)
|
73
|
+
Sneakers::Worker::Classes.define_active_job_consumers
|
74
|
+
|
75
|
+
constants.include?(name) ? const_get(name) : super
|
76
|
+
end
|
71
77
|
end
|
72
78
|
end
|
@@ -66,14 +66,14 @@ module AdvancedSneakersActiveJob
|
|
66
66
|
call.respond_to?(method_name) || super
|
67
67
|
end
|
68
68
|
|
69
|
-
private
|
70
|
-
|
71
69
|
def define_active_job_consumers
|
72
70
|
active_job_classes_with_matching_adapter.each do |worker|
|
73
71
|
AdvancedSneakersActiveJob.define_consumer(queue_name: worker.new.queue_name)
|
74
72
|
end
|
75
73
|
end
|
76
74
|
|
75
|
+
private
|
76
|
+
|
77
77
|
def active_job_classes_with_matching_adapter
|
78
78
|
([ActiveJob::Base] + ActiveJob::Base.descendants).select do |klass|
|
79
79
|
klass.queue_adapter == ::ActiveJob::QueueAdapters::AdvancedSneakersAdapter ||
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advanced-sneakers-activejob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rustam Sharshenov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-06-
|
12
|
+
date: 2020-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activejob
|