try
This commit is contained in:
parent
ad38022df2
commit
64bb50733b
|
@ -64,7 +64,8 @@ if old_gemfile_text != new_gemfile_text
|
||||||
else
|
else
|
||||||
command1 = "cd #{ENV['PWD']} && gem install bundler -v 1.17.3 && mv -f Gemfile.lock Gemfile.lock.bak123 && bundle update"
|
command1 = "cd #{ENV['PWD']} && gem install bundler -v 1.17.3 && mv -f Gemfile.lock Gemfile.lock.bak123 && bundle update"
|
||||||
end
|
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
|
a = Thread.start do
|
||||||
Bundler.with_clean_env do
|
Bundler.with_clean_env do
|
||||||
puts ENV['PWD']
|
puts ENV['PWD']
|
||||||
|
@ -73,9 +74,8 @@ if old_gemfile_text != new_gemfile_text
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
now_priority = Thread.current.priority.to_i
|
now_priority = Thread.current.priority.to_i
|
||||||
|
system('sleep 2')
|
||||||
a.priority = now_priority + 2
|
a.priority = now_priority + 2
|
||||||
puts a.priority
|
|
||||||
sleep 2
|
|
||||||
a.run
|
a.run
|
||||||
#Thread.exit
|
#Thread.exit
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue