summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-05-17 04:38:02 +0000
committerAsh McKenzie <amckenzie@gitlab.com>2019-05-17 04:38:02 +0000
commitef62eb238ff297896ee39b1b5479f7bc23bb1a46 (patch)
tree5b9d638cd8e54e94044477c4f884edfea5307b40
parent046ff468875fb8a2152655fe1d371b48555583b7 (diff)
parent66b4c6564a8493182c8ed2761bb7a81129663e1b (diff)
downloadgitlab-ce-ef62eb238ff297896ee39b1b5479f7bc23bb1a46.tar.gz
Merge branch 'cleanup-assets-older-than-4-days' into 'master'
Clean up assets that are older than 4 days to reduce assets cache size See merge request gitlab-org/gitlab-ce!28318
-rwxr-xr-xscripts/clean-old-cached-assets4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/clean-old-cached-assets b/scripts/clean-old-cached-assets
index 7a3a62a477a..8bdd3a9cdb6 100755
--- a/scripts/clean-old-cached-assets
+++ b/scripts/clean-old-cached-assets
@@ -1,6 +1,6 @@
#!/bin/bash
-# Clean up cached files that are older than 1 week
-find tmp/cache/assets/sprockets/ -type f -mtime +7 -execdir rm -- "{}" \;
+# Clean up cached files that are older than 4 days
+find tmp/cache/assets/sprockets/ -type f -mtime +4 -execdir rm -- "{}" \;
du -d 0 -h tmp/cache/assets/sprockets | cut -f1 | xargs -I % echo "tmp/cache/assets/sprockets/ is currently %"