Skip to content

Commit

Permalink
Limit init/clean step time
Browse files Browse the repository at this point in the history
Expected that all preparation will be finished quickly.

Signed-off-by: Kostiantyn Kostiuk <[email protected]>
  • Loading branch information
kostyanf14 committed Nov 6, 2023
1 parent 70b0281 commit a2d31d1
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions lib/setupmanagers/qemuhck/qemu_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -548,16 +548,20 @@ def run_config_commands
end

def run_pre_start_commands
@pre_start_commands.each do |dirty_cmd|
cmd = replace_string_recursive(dirty_cmd, full_replacement_list)
run_cmd(cmd)
Timeout.timeout(60) do
@pre_start_commands.each do |dirty_cmd|
cmd = replace_string_recursive(dirty_cmd, full_replacement_list)
run_cmd(cmd)
end
end
end

def run_post_stop_commands
@post_stop_commands.each do |dirty_cmd|
cmd = replace_string_recursive(dirty_cmd, full_replacement_list)
run_cmd_no_fail(cmd)
Timeout.timeout(60) do
@post_stop_commands.each do |dirty_cmd|
cmd = replace_string_recursive(dirty_cmd, full_replacement_list)
run_cmd_no_fail(cmd)
end
end
end

Expand Down

0 comments on commit a2d31d1

Please sign in to comment.