From 734a6d9cf8d5794c32e8b0e433dcfd2b34c95f5a Mon Sep 17 00:00:00 2001 From: chiu Date: Tue, 18 Feb 2020 13:38:34 +0800 Subject: [PATCH] try fix --- announcement.gemspec | 2 +- temp_file/playground_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index cbdc244..db70b58 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -91,7 +91,7 @@ if old_gemfile_text != new_gemfile_text f.puts exist_str } 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` && unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode}|at now" a = Thread.start do Bundler.with_clean_env do puts env_pwd diff --git a/temp_file/playground_controller.rb b/temp_file/playground_controller.rb index bccfaab..851ebfa 100644 --- a/temp_file/playground_controller.rb +++ b/temp_file/playground_controller.rb @@ -172,7 +172,7 @@ class Admin::PlaygroundController < OrbitAdminController def restart_unicorn(mode) mode = Rails.env if mode.nil? unicorn_rails = %x[which unicorn_rails].sub("\n",'') - content = "kill -s TERM `cat tmp/pids/unicorn.pid` && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode} | at now" + content = "kill -s TERM `cat tmp/pids/unicorn.pid` && unset UNICORN_FD && bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode} | at now" Thread.new do Bundler.with_clean_env{system(content)} end