mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Create packager cronjob for clearing uploaded files
This commit is contained in:
@@ -39,6 +39,7 @@ targets:
|
||||
before_precompile: "packaging/setup"
|
||||
crons:
|
||||
- packaging/cron/openproject-clear-old-sessions
|
||||
- packaging/cron/openproject-clear-uploaded-files
|
||||
services:
|
||||
- postgres
|
||||
installer: https://github.com/pkgr/installer.git
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace :attachments do
|
||||
CarrierWave.clean_cached_files!
|
||||
end
|
||||
|
||||
|
||||
desc 'Copies all attachments from the current to the given storage.'
|
||||
task :copy_to, [:to] => :environment do |_task, args|
|
||||
if args.empty?
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
APP_NAME="_APP_NAME_"
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
0 23 * * 5 root ${APP_NAME} run rake -s attachments:clear >> /var/log/${APP_NAME}/cron-clear-uploaded-files.log 2>&1
|
||||
Reference in New Issue
Block a user