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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e59d24afbe0706189e4aa949ddfd933362169d2a8e46373215d90819d45b682e
4
- data.tar.gz: 9c8e01d6e4cb6dc4bf1b16caaa9ee05c41f918dba948869f81e4baa710da67ef
3
+ metadata.gz: b302104a73850add4edc180a181961885c7c5a5c8bc520fc26b3dfa1a82c6d39
4
+ data.tar.gz: 25c67ef1d56381c0704ef70e182937412c120ff995b01ef6036e2fd840f5ab29
5
5
  SHA512:
6
- metadata.gz: fb8630ff6f668a721122208a3598ea62afb2d1693927997565ca35fef8dcc46a239c973cc9cfa5e164c372628486330d815b7c6dc0cacfbfd40cc15892af08c2
7
- data.tar.gz: cf03d517b71d0896772062a7f1319b0ad66cd3b125eea56fd1a89da6f2346eb7f78798924d40eedca723f8e512cf84b94f00f38c1d64c89a2949a03e2c71ba35
6
+ metadata.gz: 46c772e243c573a1cb4dd16b21d2cd34127665e174eab7c90946dd3065941f509b35a05b5c6fb498f634f5b03d4b926ccd3747626f66fbe2591f53423ace47a3
7
+ data.tar.gz: fc1881df18aa578066ca959c22e21617dc089b0a7615fc4c340c501bb06a35e52e99f587084b50729e6ab3c62b7aafb6bec7e60de4a2663968423db88b267fc9
@@ -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, array_of_job_arguments, parallelism)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChainedJob
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.0'
5
5
  end
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.2.1
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-09-17 00:00:00.000000000 Z
12
+ date: 2020-10-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler