mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Added mina cron:setup and mina cron:clear
This commit is contained in:
parent
ff236a9d1b
commit
78c07613d6
3 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,6 @@
|
|||
20.01.2015
|
||||
|
||||
* Added dedicated mina cron:setup Now cron is not updated automatically and should update manually.
|
||||
19.01.2015
|
||||
|
||||
* Added application-exapmle.yml and removed application.yml from repo, please
|
||||
|
|
|
@ -201,9 +201,10 @@ Deployment
|
|||
CRON
|
||||
----
|
||||
|
||||
Crontab is automatically updated after each deploy. Jobs can be viewed [here](https://github.com/internetee/registry/blob/master/config/schedule.rb).
|
||||
Crontab can be setup after deploy. Jobs can be viewed [here](https://github.com/internetee/registry/blob/master/config/schedule.rb).
|
||||
|
||||
Alternatively you can run `mina pr whenever:update` to update the crontab.
|
||||
mina pr cron:setup # to update the crontab.
|
||||
mina pr cron:clear # to clear crontab.
|
||||
|
||||
Autotesting
|
||||
-----------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue