Added mina cron:setup and mina cron:clear

This commit is contained in:
Priit Tark 2015-01-20 13:30:48 +02:00
parent ff236a9d1b
commit 78c07613d6
3 changed files with 20 additions and 4 deletions

View file

@ -125,7 +125,6 @@ task deploy: :environment do
invoke :'rails:db_migrate'
invoke :'rails:assets_precompile'
to :launch do
invoke :'whenever:update'
invoke :restart
end
end
@ -139,7 +138,6 @@ task rollback: :environment do
ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1 |
xargs -I active ln -nfs "#{deploy_to}/releases/active" "#{deploy_to}/current"
)
invoke :'whenever:update'
to :launch do
invoke :restart
end
@ -158,6 +156,20 @@ task restart: :environment do
queue "mkdir -p #{deploy_to}/current/tmp; touch #{deploy_to}/current/tmp/restart.txt"
end
namespace :cron do
desc 'Setup cron tasks.'
task setup: :environment do
invoke :'rbenv:load'
invoke :'whenever:update'
end
desc 'Clear cron tasks.'
task clear: :environment do
invoke :'rbenv:load'
invoke :'whenever:clear'
end
end
# For help in making your deploy script, see the Mina documentation:
#
# - http://nadarei.co/mina