capistrano_multiconfig_parallel 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano_multiconfig_parallel/celluloid/celluloid_manager.rb +3 -4
- data/lib/capistrano_multiconfig_parallel/celluloid/celluloid_worker.rb +2 -4
- data/lib/capistrano_multiconfig_parallel/celluloid/child_process.rb +1 -1
- data/lib/capistrano_multiconfig_parallel/celluloid/rake_worker.rb +2 -2
- data/lib/capistrano_multiconfig_parallel/celluloid/terminal_table.rb +1 -1
- data/lib/capistrano_multiconfig_parallel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e3ee4bdf3fef14756626f8c3aa37346af35061f
|
4
|
+
data.tar.gz: a7977209db28f942efd3cd5782b0f4b418bc3d3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29010db137366388494ad4cf1a877d16451bb72ce6d2ca3b7077029f36801c944254549c4ab7f9b6d64e873a9cc11339c9c30972e888b7bd99c887fb212db151
|
7
|
+
data.tar.gz: 3401ec88ed79515d49d5c8fa20b17790b5ac79fb5aceb8b732877332ce698da0007000eec67f3a3b4fe1d727d76dccf5df899ed0df9921094b2f1e12a4bbdc81
|
@@ -223,7 +223,7 @@ module CapistranoMulticonfigParallel
|
|
223
223
|
|
224
224
|
def dispatch_new_job(job)
|
225
225
|
original_env = job['env_options']
|
226
|
-
env_opts = @job_manager.get_app_additional_env_options(job['app_name'], job['
|
226
|
+
env_opts = @job_manager.get_app_additional_env_options(job['app_name'], job['env'])
|
227
227
|
job['env_options'] = original_env.merge(env_opts)
|
228
228
|
async.delegate(job)
|
229
229
|
end
|
@@ -274,13 +274,12 @@ module CapistranoMulticonfigParallel
|
|
274
274
|
end
|
275
275
|
|
276
276
|
def worker_died(worker, reason)
|
277
|
-
debug("worker with mailbox #{worker.mailbox.inspect} died for reason: #{reason}") if self.class.debug_enabled?
|
278
277
|
job = @worker_to_job[worker.mailbox.address]
|
279
|
-
debug job.inspect if self.class.debug_enabled?
|
278
|
+
debug("worker job #{job} with mailbox #{worker.mailbox.inspect} died for reason: #{reason}") if self.class.debug_enabled?
|
280
279
|
@worker_to_job.delete(worker.mailbox.address)
|
281
|
-
debug "restarting #{job} on new worker" if self.class.debug_enabled?
|
282
280
|
return if job.blank? || job_failed?(job)
|
283
281
|
return unless job['action_name'] == 'deploy'
|
282
|
+
debug "restarting #{job} on new worker" if self.class.debug_enabled?
|
284
283
|
job = job.merge(:action => 'deploy:rollback', 'worker_action' => 'worker_died')
|
285
284
|
delegate(job)
|
286
285
|
end
|
@@ -124,7 +124,7 @@ module CapistranoMulticonfigParallel
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def check_gitflow
|
127
|
-
return if
|
127
|
+
return if dry_running? || @env_name != 'staging' || !@manager.can_tag_staging? || !executed_task?(CapistranoMulticonfigParallel::GITFLOW_TAG_STAGING_TASK)
|
128
128
|
@manager.dispatch_new_job(@job.merge('env' => 'production'))
|
129
129
|
end
|
130
130
|
|
@@ -154,7 +154,7 @@ module CapistranoMulticonfigParallel
|
|
154
154
|
end
|
155
155
|
|
156
156
|
def executed_task?(task)
|
157
|
-
|
157
|
+
rake_tasks.present? && rake_tasks.index(task.to_s).present?
|
158
158
|
end
|
159
159
|
|
160
160
|
def task_approval(message)
|
@@ -168,7 +168,6 @@ module CapistranoMulticonfigParallel
|
|
168
168
|
end
|
169
169
|
|
170
170
|
def save_tasks_to_be_executed(message)
|
171
|
-
return unless message['action'] == 'count'
|
172
171
|
debug("worler #{@job_id} current invocation chain : #{rake_tasks.inspect}") if debug_enabled?
|
173
172
|
rake_tasks << message['task'] if rake_tasks.last != message['task']
|
174
173
|
end
|
@@ -249,7 +248,6 @@ module CapistranoMulticonfigParallel
|
|
249
248
|
end
|
250
249
|
|
251
250
|
def notify_finished(exit_status)
|
252
|
-
return unless @execute_deploy
|
253
251
|
if exit_status.exitstatus != 0
|
254
252
|
debug("worker #{job_id} tries to terminate") if debug_enabled?
|
255
253
|
raise(CapistranoMulticonfigParallel::CelluloidWorker::TaskFailed, "task failed with exit status #{exit_status.inspect} ") # force worker to rollback
|
@@ -48,7 +48,7 @@ module CapistranoMulticonfigParallel
|
|
48
48
|
|
49
49
|
def check_exit_status
|
50
50
|
return unless @exit_status.present?
|
51
|
-
if @options[:dry_run]
|
51
|
+
if @exit_status.exitstatus == 0 && @options[:dry_run]
|
52
52
|
debug("worker #{@actor.job_id} starts execute deploy") if @debug_enabled
|
53
53
|
@actor.async.execute_deploy
|
54
54
|
elsif !@actor.worker_finshed?
|
@@ -142,9 +142,9 @@ module CapistranoMulticonfigParallel
|
|
142
142
|
def printing_question?(data)
|
143
143
|
get_question_details(data).present?
|
144
144
|
end
|
145
|
-
|
145
|
+
|
146
146
|
def user_prompt_needed?(data)
|
147
|
-
return
|
147
|
+
return if !printing_question?(data) || @action != "invoke"
|
148
148
|
|
149
149
|
details = get_question_details(data)
|
150
150
|
default = details.second.present? ? details.second : nil
|
@@ -140,7 +140,7 @@ module CapistranoMulticonfigParallel
|
|
140
140
|
total_tasks = worker_dry_running?(worker) ? nil : tasks.size
|
141
141
|
task_index = worker_dry_running?(worker) ? 0 : tasks.index(current_task.to_s).to_i + 1
|
142
142
|
percent = percent_of(task_index, total_tasks)
|
143
|
-
result = worker_dry_running?(worker) ? "Please wait.. building the progress bars" : "Progress [#{sprintf('%.2f', percent)}%] (#{task_index} of #{total_tasks})"
|
143
|
+
result = worker_dry_running?(worker) ? "Please wait.. building the progress bars" : "Progress [#{sprintf('%.2f', percent)}%] (executed #{task_index} of #{total_tasks})"
|
144
144
|
if worker.alive?
|
145
145
|
worker.crashed? ? result.red : result.green
|
146
146
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano_multiconfig_parallel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bogdanRada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: celluloid-pmap
|