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