Load rates when deploying

This commit is contained in:
Hakan Ensari 2016-04-11 14:18:39 +01:00
parent 12efdf8a1b
commit 0471499846

View File

@ -11,6 +11,6 @@ run 'whenever --update-crontab'
tasks = []
num_migrations = `git diff #{oldrev} #{newrev} --diff-filter=A --name-only -z db/migrate`.split("\0").size
tasks << 'db:migrate' if num_migrations > 0
tasks << 'rates:update'
tasks << 'rates:load'
run "foreman run bundle exec rake #{tasks.join(" ")}" if tasks.any?
run "foreman run bundle exec rake #{tasks.join(' ')}"