This commit is contained in:
chiu 2020-02-17 21:13:25 +08:00
parent a3d1cc3157
commit 96a04d7fee
1 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ if old_gemfile_text != new_gemfile_text
command2 = '' command2 = ''
if old_playground != new_playground if old_playground != new_playground
puts 'updating playground' puts 'updating playground'
command2 = "cp -f #{app_path}/temp_file/playground_controller.rb #{ENV['PWD']}/app/controllers/admin/playground_controller.rb" command2 = "cp -f #{app_path}/temp_file/playground_controller.rb #{ENV['PWD']}/app/controllers/admin/playground_controller.rb ;"
#File.open(ENV['PWD']+'/app/controllers/admin/playground_controller.rb', 'w') do |file| #File.open(ENV['PWD']+'/app/controllers/admin/playground_controller.rb', 'w') do |file|
# file.write new_playground # file.write new_playground
#end #end
@ -55,7 +55,7 @@ if old_gemfile_text != new_gemfile_text
command3 = '' command3 = ''
if old_multithread != new_multithread if old_multithread != new_multithread
puts 'updating multithread' puts 'updating multithread'
command3 = "cp -f #{app_path}/temp_file/multithread.rb #{ENV['PWD']}/app/models/multithread.rb" command3 = "cp -f #{app_path}/temp_file/multithread.rb #{ENV['PWD']}/app/models/multithread.rb ;"
#File.open(ENV['PWD']+'/app/models/multithread.rb', 'w') do |file| #File.open(ENV['PWD']+'/app/models/multithread.rb', 'w') do |file|
# file.write new_multithread # file.write new_multithread
#end #end
@ -87,7 +87,7 @@ if old_gemfile_text != new_gemfile_text
f.puts exist_str f.puts exist_str
} }
end end
all_command = "#{command1} && cd #{ENV['PWD']} && #{command2}&& #{command3}&& #{command4}&& kill -s TERM `cat tmp/pids/unicorn.pid`; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now" all_command = "#{command1} && cd #{ENV['PWD']} && #{command2} #{command3} #{command4}&& kill -s TERM `cat tmp/pids/unicorn.pid`; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now"
puts all_command puts all_command
a = Thread.start do a = Thread.start do
Bundler.with_clean_env do Bundler.with_clean_env do