[27235] Clear tmp:cache through cronjob

The `tmp:cache:clear` does not affect other caches such as memcached,
since it's basically `rm -rf tmp/cache/*`

ef5d85709d/railties/lib/rails/tasks/tmp.rake (L25-L30)

https://community.openproject.com/wp/27235
pull/6440/head
Oliver Günther 6 years ago
parent f231556ca7
commit 143345fbd7
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 1
      .pkgr.yml
  2. 3
      packaging/cron/openproject-clear-tmp-cache

@ -26,6 +26,7 @@ crons:
- packaging/cron/openproject-hourly-tasks
- packaging/cron/openproject-clear-old-sessions
- packaging/cron/openproject-clear-uploaded-files
- packaging/cron/openproject-clear-tmp-cache
services:
- postgres
installer: https://github.com/pkgr/installer.git

@ -0,0 +1,3 @@
APP_NAME="_APP_NAME_"
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
45 2 * * 7 root ${APP_NAME} run rake -s tmp:cache:clear >> /var/log/${APP_NAME}/cron-clear-tmp-files.log 2>&1
Loading…
Cancel
Save