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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fadfd0fedca1e4debad7bd9df14745d91c5ecf5
|
4
|
+
data.tar.gz: 7e313f6a8d664ac20c179ceb4a17c21a5354c0c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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? &&
|
91
|
-
|
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
|