capistrano_multiconfig_parallel 1.2.7 → 1.2.8

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
  SHA1:
3
- metadata.gz: 6ecb247c06df5b927d2c0828d2759f42cb549231
4
- data.tar.gz: df2b541700980226b779a847e3baeb88388a337a
3
+ metadata.gz: 5fadfd0fedca1e4debad7bd9df14745d91c5ecf5
4
+ data.tar.gz: 7e313f6a8d664ac20c179ceb4a17c21a5354c0c8
5
5
  SHA512:
6
- metadata.gz: 66bbe4a4892598b536e5497c9c324beee705d3eb90eed87bf8e4af1049ebc215a199e2fc5e3176fce12744029c12f46de9a44c802813de9c58cf4377e6998144
7
- data.tar.gz: 0f4e6125ff9e529f68c83f2d218c1938f7cbc20cdc5e23f12b3eeb8abd6195aff62f980e25fabcd7c7c7ef923c87b5ed2296cc6082eace23eb1da594a4d8a9fa
6
+ metadata.gz: 1ab153ac376b3fccb60f013ec9e63b2578579e24d2a8fe2baf48cbbfd72c895cbca87f3d6c69f8534d155795f91309b3a4947222d9fa1ecb9884cba306e7d5eb
7
+ data.tar.gz: 9e3fe5f812b6f49e037f898be3f719cd6895929261233bc92a64a1a893be7404ef8856299b752689c2549d37964ed43beea1135a007eeee266bdb1e523a9fa66
@@ -165,7 +165,7 @@ module CapistranoMulticonfigParallel
165
165
  log_to_file("worker #{job_id} tries to terminate with exit_status #{exit_status}")
166
166
  @manager.mark_completed_remaining_tasks(@job)
167
167
  update_machine_state('FINISHED') if exit_status == 0
168
- @manager.workers_terminated.signal('completed') if @manager.alive? && @manager.all_workers_finished?
168
+ @manager.workers_terminated.signal('completed') if @manager.present? && @manager.alive? && @manager.all_workers_finished?
169
169
  end
170
170
 
171
171
  def notify_finished(exit_status)
@@ -7,6 +7,12 @@ module CapistranoMulticonfigParallel
7
7
 
8
8
  attr_reader :options, :errors, :manager, :position, :job_manager, :terminal_rows, :screen_erased
9
9
 
10
+ delegate :workers_terminated,
11
+ to: :manager
12
+
13
+ delegate :condition,
14
+ to: :job_manager
15
+
10
16
  def self.topic
11
17
  'sshkit_terminal'
12
18
  end
@@ -68,7 +74,7 @@ module CapistranoMulticonfigParallel
68
74
  end
69
75
 
70
76
  def setup_table_jobs(table)
71
- jobs = @manager.alive? ? @manager.jobs.dup : []
77
+ jobs = managers_alive? ? @manager.jobs.dup : []
72
78
  jobs.each do |job_id, job|
73
79
  table.add_row(job.terminal_row)
74
80
  table.add_separator if jobs.keys.last != job_id
@@ -87,8 +93,8 @@ module CapistranoMulticonfigParallel
87
93
  end
88
94
 
89
95
  def signal_complete
90
- if managers_alive? && @manager.all_workers_finished? && @manager.workers_terminated.instance_variable_get("@waiters").blank?
91
- @job_manager.condition.signal('completed') if @job_manager.alive?
96
+ if managers_alive? && @manager.all_workers_finished? && workers_terminated.instance_variable_get("@waiters").blank?
97
+ condition.signal('completed') if @job_manager.alive? && condition.instance_variable_get("@waiters").present?
92
98
  elsif !managers_alive?
93
99
  terminate
94
100
  end
@@ -8,7 +8,7 @@ module CapistranoMulticonfigParallel
8
8
  module VERSION
9
9
  MAJOR = 1
10
10
  MINOR = 2
11
- TINY = 7
11
+ TINY = 8
12
12
  PRE = nil
13
13
 
14
14
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano_multiconfig_parallel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada