mirror of
https://github.com/internetee/registry.git
synced 2025-08-12 12:39:34 +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
|
19.01.2015
|
||||||
|
|
||||||
* Added application-exapmle.yml and removed application.yml from repo, please
|
* Added application-exapmle.yml and removed application.yml from repo, please
|
||||||
|
|
|
@ -201,9 +201,10 @@ Deployment
|
||||||
CRON
|
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
|
Autotesting
|
||||||
-----------
|
-----------
|
||||||
|
|
|
@ -125,7 +125,6 @@ task deploy: :environment do
|
||||||
invoke :'rails:db_migrate'
|
invoke :'rails:db_migrate'
|
||||||
invoke :'rails:assets_precompile'
|
invoke :'rails:assets_precompile'
|
||||||
to :launch do
|
to :launch do
|
||||||
invoke :'whenever:update'
|
|
||||||
invoke :restart
|
invoke :restart
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -139,7 +138,6 @@ task rollback: :environment do
|
||||||
ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1 |
|
ls -Art "#{deploy_to}/releases" | sort | tail -n 2 | head -n 1 |
|
||||||
xargs -I active ln -nfs "#{deploy_to}/releases/active" "#{deploy_to}/current"
|
xargs -I active ln -nfs "#{deploy_to}/releases/active" "#{deploy_to}/current"
|
||||||
)
|
)
|
||||||
invoke :'whenever:update'
|
|
||||||
to :launch do
|
to :launch do
|
||||||
invoke :restart
|
invoke :restart
|
||||||
end
|
end
|
||||||
|
@ -158,6 +156,20 @@ task restart: :environment do
|
||||||
queue "mkdir -p #{deploy_to}/current/tmp; touch #{deploy_to}/current/tmp/restart.txt"
|
queue "mkdir -p #{deploy_to}/current/tmp; touch #{deploy_to}/current/tmp/restart.txt"
|
||||||
end
|
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:
|
# For help in making your deploy script, see the Mina documentation:
|
||||||
#
|
#
|
||||||
# - http://nadarei.co/mina
|
# - http://nadarei.co/mina
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue