chained_job 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chained_job/config.rb +2 -0
- data/lib/chained_job/middleware.rb +6 -1
- data/lib/chained_job/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b302104a73850add4edc180a181961885c7c5a5c8bc520fc26b3dfa1a82c6d39
|
4
|
+
data.tar.gz: 25c67ef1d56381c0704ef70e182937412c120ff995b01ef6036e2fd840f5ab29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46c772e243c573a1cb4dd16b21d2cd34127665e174eab7c90946dd3065941f509b35a05b5c6fb498f634f5b03d4b926ccd3747626f66fbe2591f53423ace47a3
|
7
|
+
data.tar.gz: fc1881df18aa578066ca959c22e21617dc089b0a7615fc4c340c501bb06a35e52e99f587084b50729e6ab3c62b7aafb6bec7e60de4a2663968423db88b267fc9
|
data/lib/chained_job/config.rb
CHANGED
@@ -12,6 +12,7 @@ module ChainedJob
|
|
12
12
|
:arguments_queue_expiration,
|
13
13
|
:around_start_chains,
|
14
14
|
:around_chain_process,
|
15
|
+
:around_array_of_job_arguments,
|
15
16
|
:debug,
|
16
17
|
:logger,
|
17
18
|
:redis,
|
@@ -26,6 +27,7 @@ module ChainedJob
|
|
26
27
|
|
27
28
|
self.around_start_chains = ->(_options, &block) { block.call }
|
28
29
|
self.around_chain_process = ->(_options, &block) { block.call }
|
30
|
+
self.around_array_of_job_arguments = ->(_options, &block) { block.call }
|
29
31
|
|
30
32
|
self.debug = true
|
31
33
|
end
|
@@ -13,10 +13,15 @@ module ChainedJob
|
|
13
13
|
if worker_id
|
14
14
|
ChainedJob::Process.run(self, worker_id, tag)
|
15
15
|
else
|
16
|
-
ChainedJob::StartChains.run(self.class,
|
16
|
+
ChainedJob::StartChains.run(self.class, arguments_array, parallelism)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
+
def arguments_array
|
21
|
+
options = { job_class: self.class }
|
22
|
+
ChainedJob.config.around_array_of_job_arguments.call(options) { array_of_job_arguments }
|
23
|
+
end
|
24
|
+
|
20
25
|
def array_of_job_arguments
|
21
26
|
raise NoMethodError, 'undefined method array_of_job_arguments'
|
22
27
|
end
|
data/lib/chained_job/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chained_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mantas Kūjalis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|