diff options
author | elijah <elijah@riseup.net> | 2015-03-30 22:33:05 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-03-30 22:33:05 -0700 |
commit | b64940c1de7cf42acef018ca2fbf5beff4f48e80 (patch) | |
tree | 13925f4c050d55c413e15307e48cdb803caa5945 /puppet/modules/site_webapp/manifests/cron.pp | |
parent | 3172444652af71bd771609d6b80258e70cc82ce9 (diff) |
added support for rotating couchdb databases.
Diffstat (limited to 'puppet/modules/site_webapp/manifests/cron.pp')
-rw-r--r-- | puppet/modules/site_webapp/manifests/cron.pp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/puppet/modules/site_webapp/manifests/cron.pp b/puppet/modules/site_webapp/manifests/cron.pp index 811ad11d..bdf0fb74 100644 --- a/puppet/modules/site_webapp/manifests/cron.pp +++ b/puppet/modules/site_webapp/manifests/cron.pp @@ -2,6 +2,18 @@ class site_webapp::cron { # cron tasks that need to be performed to cleanup the database cron { + 'rotate_databases': + command => 'cd /srv/leap/webapp && bundle exec rake db:rotate', + environment => 'RAILS_ENV=production', + hour => [0,6,12,18], + minute => 0; + + 'delete_tmp_databases': + command => 'cd /srv/leap/webapp && bundle exec rake db:deletetmp', + environment => 'RAILS_ENV=production', + hour => 1, + minute => 1; + 'remove_expired_sessions': command => 'cd /srv/leap/webapp && bundle exec rake cleanup:sessions', environment => 'RAILS_ENV=production', |