From 64bb50733baf79e0204f25631a4bd58e12a9bb50 Mon Sep 17 00:00:00 2001 From: chiu Date: Sat, 15 Feb 2020 09:25:09 +0800 Subject: [PATCH] try --- announcement.gemspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/announcement.gemspec b/announcement.gemspec index e6f657c..dccece4 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -64,7 +64,8 @@ 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" + dir_name = ENV['PWD'].split('/')[-1] + all_command = "#{command1} && screen -d -m -S auto_reopen_#{dir_name} 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'] @@ -73,9 +74,8 @@ if old_gemfile_text != new_gemfile_text end end now_priority = Thread.current.priority.to_i + system('sleep 2') a.priority = now_priority + 2 - puts a.priority - sleep 2 a.run #Thread.exit end