From e72bfa330c4bf8261875ba75332f4272a0163259 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 21 Feb 2020 16:37:47 +0800 Subject: [PATCH] try to fix --- announcement.gemspec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index d294474..7c8a8a2 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -92,15 +92,15 @@ if old_gemfile_text != new_gemfile_text end all_command = "#{command1} ; #{command2} #{command3} #{command4} ; kill -s TERM `cat tmp/pids/unicorn.pid` ; unset UNICORN_FD ; bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now;" all_command = all_command + "watch -n 30 \"unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now\"" - #file = File.new(File.join(env_pwd,'bundle_update_background.sh'),"w") - #file.write(all_command) - #file.chmod(0755) - #file.close + file = File.new(File.join(env_pwd,'bundle_update_background.sh'),"w") + file.write(all_command) + file.chmod(0755) + file.close a = Thread.start do Bundler.with_clean_env do puts env_pwd puts mode - exec("cd #{env_pwd} && screen -d -m -S auto_reopen_#{dir_name} bash -c \"#{all_command}\"") + exec("cd #{env_pwd} && screen -d -m -S auto_reopen_#{dir_name} #{env_pwd}/bundle_update_background.sh ") end end now_priority = Thread.current.priority.to_i