capistrano_multiconfig_parallel 0.11.6 → 0.12.0
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 +4 -4
- data/README.md +0 -4
- data/lib/capistrano_multiconfig_parallel/base.rb +1 -1
- data/lib/capistrano_multiconfig_parallel/celluloid/celluloid_worker.rb +1 -11
- data/lib/capistrano_multiconfig_parallel/celluloid/terminal_table.rb +13 -13
- data/lib/capistrano_multiconfig_parallel/configuration.rb +1 -11
- data/lib/capistrano_multiconfig_parallel/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81ed4eafe6902e7db31e4ca533f2d2970cbff46d
|
4
|
+
data.tar.gz: f754d89fb1cf13bba42acfdf1a525569c2382ef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40fa707f05f890387d45b9aa15d49e6d687e0faaf8be01e65336aa41b020d5e00b12f06e93a568484f5b91601021d036c1c1b71c468c212ecea1ab8ea27d87c7
|
7
|
+
data.tar.gz: dacefac1fb90d60cd5cdb731ac452e1ff3769983986ea72c7031a72a651d754caef13839adc02ef30c2caf9b5c998752ab31011fd1d409bb2eac7c2d0e94fdc3
|
data/README.md
CHANGED
@@ -119,10 +119,6 @@ application_dependencies: []
|
|
119
119
|
* --multi-debug
|
120
120
|
* if option is present and has value TRUE , will enable debugging of workers
|
121
121
|
|
122
|
-
* --multi-progress
|
123
|
-
* If option is present and has value TRUE will first execute before any process , same task but with option "--dry-run" in order to show progress of how many tasks are in total for that task and what is the progress of executing
|
124
|
-
This will slow down the workers , because they will execute twice the same task.
|
125
|
-
|
126
122
|
* --multi-secvential
|
127
123
|
* If parallel executing does not work for you, you can use this option so that each process is executed normally and ouputted to the screen.
|
128
124
|
However this means that all other tasks will have to wait for each other to finish before starting
|
@@ -19,7 +19,7 @@ module CapistranoMulticonfigParallel
|
|
19
19
|
}
|
20
20
|
|
21
21
|
class << self
|
22
|
-
attr_accessor
|
22
|
+
attr_accessor :execute_in_sequence, :logger, :original_args, :interactive_menu
|
23
23
|
|
24
24
|
def root
|
25
25
|
File.expand_path(File.dirname(__dir__))
|
@@ -72,17 +72,7 @@ module CapistranoMulticonfigParallel
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def execute_after_succesfull_subscription
|
75
|
-
if @action_name != 'deploy:rollback' && CapistranoMulticonfigParallel.show_task_progress
|
76
|
-
@executed_dry_run = true
|
77
|
-
@rake_tasks = []
|
78
|
-
setup_task_arguments(dry_run_command,'count_rake=true' )
|
79
|
-
@child_process = CapistranoMulticonfigParallel::ChildProcess.new
|
80
|
-
Actor.current.link @child_process
|
81
|
-
debug("worker #{@job_id} executes: #{generate_command}") if debug_enabled?
|
82
|
-
@child_process.async.work(generate_command, actor: Actor.current, silent: true, dry_run: true)
|
83
|
-
else
|
84
75
|
async.execute_deploy
|
85
|
-
end
|
86
76
|
end
|
87
77
|
|
88
78
|
def rake_tasks
|
@@ -105,7 +95,7 @@ module CapistranoMulticonfigParallel
|
|
105
95
|
|
106
96
|
def execute_deploy
|
107
97
|
@execute_deploy = true
|
108
|
-
debug("invocation chain #{@job_id} is : #{@rake_tasks.inspect}") if debug_enabled?
|
98
|
+
debug("invocation chain #{@job_id} is : #{@rake_tasks.inspect}") if debug_enabled?
|
109
99
|
check_child_proces
|
110
100
|
setup_task_arguments
|
111
101
|
debug("worker #{@job_id} executes: #{generate_command}") if debug_enabled?
|
@@ -21,10 +21,10 @@ module CapistranoMulticonfigParallel
|
|
21
21
|
def notify_time_change(topic, message)
|
22
22
|
return unless topic == CapistranoMulticonfigParallel::TerminalTable::TOPIC
|
23
23
|
default_headings = ['Job ID', 'App/Stage', 'Action', 'ENV Variables', 'Current Task']
|
24
|
-
if CapistranoMulticonfigParallel.show_task_progress
|
25
|
-
|
26
|
-
|
27
|
-
end
|
24
|
+
# if CapistranoMulticonfigParallel.show_task_progress
|
25
|
+
# default_headings << 'Total'
|
26
|
+
# default_headings << 'Progress'
|
27
|
+
# end
|
28
28
|
table = Terminal::Table.new(title: 'Deployment Status Table', headings: default_headings)
|
29
29
|
if @manager.jobs.present? && message_valid?(message)
|
30
30
|
@manager.jobs.each do |job_id, _job|
|
@@ -111,15 +111,15 @@ module CapistranoMulticonfigParallel
|
|
111
111
|
{ value: details['env_options'] },
|
112
112
|
{ value: "#{details['state']}" }
|
113
113
|
]
|
114
|
-
if CapistranoMulticonfigParallel.show_task_progress
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
end
|
114
|
+
# if CapistranoMulticonfigParallel.show_task_progress
|
115
|
+
# if worker.alive?
|
116
|
+
# row << { value: worker.rake_tasks.size }
|
117
|
+
# row << { value: worker_progress(details, worker) }
|
118
|
+
# else
|
119
|
+
# row << { value: 0 }
|
120
|
+
# row << { value: worker_state(worker) }
|
121
|
+
# end
|
122
|
+
# end
|
123
123
|
table.add_row(row)
|
124
124
|
table.add_separator if @manager.jobs.keys.last.to_i != job_id.to_i
|
125
125
|
end
|
@@ -47,15 +47,6 @@ module CapistranoMulticonfigParallel
|
|
47
47
|
description: 'if option is present and has value TRUE , will enable debugging of workers',
|
48
48
|
default: default_config[:multi_debug]
|
49
49
|
},
|
50
|
-
{
|
51
|
-
name: 'multi_progress',
|
52
|
-
type: :boolean,
|
53
|
-
description: "if option is present and has value TRUE will first execute before any process
|
54
|
-
\t same task but with option '--dry-run' in order to show progress of how many tasks
|
55
|
-
\t are in total for that task and what is the progress of executing
|
56
|
-
\t This will slow down the workers , because they will execute twice the same task.",
|
57
|
-
default: default_config[:multi_progress]
|
58
|
-
},
|
59
50
|
{
|
60
51
|
name: 'multi_secvential',
|
61
52
|
type: :boolean,
|
@@ -169,7 +160,7 @@ module CapistranoMulticonfigParallel
|
|
169
160
|
end
|
170
161
|
|
171
162
|
def check_configuration(c)
|
172
|
-
%w(multi_debug
|
163
|
+
%w(multi_debug multi_secvential task_confirmation_active track_dependencies websocket_server.enable_debug syncronize_confirmation).each do |prop|
|
173
164
|
c.send("#{prop}=", c[prop.to_sym]) if check_boolean(c, prop.to_sym)
|
174
165
|
end
|
175
166
|
%w(task_confirmations development_stages apply_stage_confirmation).each do |prop|
|
@@ -181,7 +172,6 @@ module CapistranoMulticonfigParallel
|
|
181
172
|
|
182
173
|
def check_additional_config(c)
|
183
174
|
CapistranoMulticonfigParallel::CelluloidManager.debug_enabled = true if c[:multi_debug].to_s.downcase == 'true'
|
184
|
-
CapistranoMulticonfigParallel.show_task_progress = true if c[:multi_progress].to_s.downcase == 'true'
|
185
175
|
CapistranoMulticonfigParallel.execute_in_sequence = true if c[:multi_secvential].to_s.downcase == 'true'
|
186
176
|
end
|
187
177
|
end
|