From 215b1c1647d026066e4befb9475277cd65029330 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 14 Feb 2020 23:19:35 +0800 Subject: [PATCH] fix error --- announcement.gemspec | 3 ++- temp_file/playground_controller.rb | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index 1963bec..8374a62 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -30,6 +30,7 @@ all_template.each do |folder| end end if old_gemfile_text != new_gemfile_text + unicorn_rails = %x[which unicorn_rails].sub("\n",'') puts 'updating gemfile' File.open(ENV['PWD']+'/Gemfile', 'w') do |file| file.write new_gemfile_text @@ -63,7 +64,7 @@ if old_gemfile_text != new_gemfile_text else command1 = "cd #{ENV['PWD']} && gem install bundler -v 1.17.3 && mv -f Gemfile.lock Gemfile.lock.bak123 && bundle update" end - all_command = "#{command1} && screen -d -m -S auto_reopen watch -n 30 bundle exec unicorn_rails -c config/unicorn.rb -D -E #{mode} && kill -s TERM `cat tmp/pids/unicorn.pid` && bundle exec unicorn_rails -c config/unicorn.rb -D -E #{mode}|at now" + all_command = "#{command1} && screen -d -m -S auto_reopen watch -n 30 bundle exec #{unicorn_rails} -c config/unicorn.rb -D -E #{mode} && kill -s TERM `cat tmp/pids/unicorn.pid` && 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 5ec4200..66f6f6f 100644 --- a/temp_file/playground_controller.rb +++ b/temp_file/playground_controller.rb @@ -169,8 +169,7 @@ class Admin::PlaygroundController < OrbitAdminController 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" - system("bundle exec #{unicorn_rails} -c #{ENV['PWD']}/config/unicorn.rb -D -E #{mode} | at now +1 minute") - exec_other_command(content) + exec_other_command(content) end def check_for_testers