How could I create a "nice" Capistrano deployment?
2 answers
For those who want to have a good assets:precomile
job for a assets:precomile
very time consuming, the following.
namespace :deploy do
task :map_bins_to_nice do
SSHKit.config.command_map.prefix[:rake]&.unshift('nice -n 19')
end
end
Capistrano::DSL.stages.each do |stage|
after stage, 'deploy:map_bins_to_nice'
end
Note that this makes every rake
task niced. Eg rake db:migrate
.
This was originally taken from the following post (Japanese). http://d.hatena.ne.jp/nekonokataomoi/20140819/1408443332
0
source to share