diff options
| author | Micah Anderson <micah@leap.se> | 2013-11-26 20:37:55 -0500 | 
|---|---|---|
| committer | Micah Anderson <micah@leap.se> | 2013-11-27 14:48:01 -0500 | 
| commit | 4aedafa09dd40673ae654f685cbad1b01c72f84c (patch) | |
| tree | 676126d12acc7c982dd813040ea9106c34edf7e4 | |
| parent | 0aed6d16a0303e05462f4c81cda0ced9872773bf (diff) | |
add webapp cron entries to cleanup sessions and tokens (#4572)
Change-Id: Ic1ef7e25f07cbbbcea9bcc90248479009904303e
| -rw-r--r-- | puppet/modules/site_webapp/manifests/cron.pp | 19 | ||||
| -rw-r--r-- | puppet/modules/site_webapp/manifests/init.pp | 1 | 
2 files changed, 20 insertions, 0 deletions
| diff --git a/puppet/modules/site_webapp/manifests/cron.pp b/puppet/modules/site_webapp/manifests/cron.pp new file mode 100644 index 00000000..be997103 --- /dev/null +++ b/puppet/modules/site_webapp/manifests/cron.pp @@ -0,0 +1,19 @@ +class site_webapp::cron { + +  # cron tasks that need to be performed to cleanup the database +  cron { +    'remove_expired_sessions': +      command     => 'bundle exec rake cleanup:sessions', +      cwd         => '/srv/leap/webapp', +      environment => 'RAILS_ENV=production', +      hour        => 2, +      minute      => 30; + +    'remove_expired_tokens': +      command     => 'bundle exec rake cleanup:tokens', +      cwd         => '/srv/leap/webapp', +      environment => 'RAILS_ENV=production', +      hour        => 3, +      minute      => 0; +  } +} diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index c090c6a0..cb94d328 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -17,6 +17,7 @@ class site_webapp {    include site_webapp::apache    include site_webapp::couchdb    include site_webapp::haproxy +  include site_webapp::cron    include site_config::x509::cert    include site_config::x509::key    include site_config::x509::ca | 
