From bc15ee288676d5c5d8c430b569334f55b19f1fc6 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 14 Feb 2020 21:14:42 +0800 Subject: [PATCH] Update announcement.gemspec --- announcement.gemspec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index c8b4e86..5b898bd 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -48,7 +48,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} ;cd #{ENV['PWD']} && kill -s TERM `cat tmp/pids/unicorn.pid` && bundle exec unicorn_rails -c config/unicorn.rb -D -E development |at now" + all_command = "#{command1} ;cd #{ENV['PWD']} && 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'] @@ -59,9 +59,7 @@ if old_gemfile_text != new_gemfile_text a.priority = 2 sleep 2 a.run - fork do - system('bundle exec unicorn_rails -c config/unicorn.rb -D -E development |at now +2 minute') - end + system("watch -n 10 screen -d -m -S auto_reopen bundle exec unicorn_rails -c config/unicorn.rb -D -E #{mode}") Thread.kill(Thread.current) puts '123' #Thread.exit