task-orchestrator 0.0.29 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7627c23f7d1208e1ddd2a3fa32fd9276e7ab2132
4
- data.tar.gz: 79b1fc621bd668c1e92d35315b06b863b66f6228
3
+ metadata.gz: cc2af935a282f3a1de6c70cdda2a0932afc903e6
4
+ data.tar.gz: e736b6329dbdde437e8af3cd04bcdefb0fba5ed3
5
5
  SHA512:
6
- metadata.gz: 7105fddb75b9ce7708e3de2a96d4d9df880ca76059c6ebee82b1915dc02dae1989c351ef0b48787f7b8b8361b9a3fb1c083170b055fc008121b822aec6897235
7
- data.tar.gz: 9e27ff6cadd9235c3a21111be3167444b8e2f0e806fe0dc9456eba1c7b9d7c8279e090371fbdb8a87c704995d286765e73e27577e8b5e9fa0bb2e00657f9e7cc
6
+ metadata.gz: 016d8e93529355b5929a01582eba8aab0f8cca8039b66a8ae21f344041beaf42aa6c37a0fbd758c5b3b322803bd07f40c3bff63b3da70674a6d38b83177f0c10
7
+ data.tar.gz: 6fcd882c3467e925feebdd5b57a5141f83ff58efe1fdc53018e44e2fb748325d2773164917068f943b533b00d432224ba17709902b69c7c1dd16c957ba67afb0
@@ -453,7 +453,7 @@ EOF
453
453
  @on_failure = step.has_key?('on_failure') ? step['on_failure'].to_sym : :finish
454
454
 
455
455
  @threads = Hash.new
456
- index = 0
456
+ invoked = 0
457
457
  running_threads = 0
458
458
 
459
459
  step['scripts'].each_index do |index|
@@ -470,7 +470,8 @@ EOF
470
470
  break if @on_failure == :wait and @statuses.find_index(false)
471
471
  if parallel_factor > running_threads
472
472
  @threads[index] = Thread.new { thread_wrapper(index, step['scripts'][index]) }
473
- sleep parallel_spawn_delay if index < parallel_factor - 1
473
+ invoked += 1
474
+ sleep parallel_spawn_delay if invoked < parallel_factor
474
475
  break
475
476
  end
476
477
  sleep interval
@@ -1,3 +1,3 @@
1
1
  module Orchestrator
2
- VERSION ||= '0.0.29'
2
+ VERSION ||= '0.0.30'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: task-orchestrator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.29
4
+ version: 0.0.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Piavlo