summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-05-14 21:33:48 +0200
committerRémy Coutable <remy@rymai.me>2019-05-14 21:34:06 +0200
commit66b4c6564a8493182c8ed2761bb7a81129663e1b (patch)
tree98bcbfa6afac1503b6e74dcb0e2fd65af849bf54 /scripts
parent1ca4241374c99c5d82936a20b20eb2fa976ce51f (diff)
downloadgitlab-ce-66b4c6564a8493182c8ed2761bb7a81129663e1b.tar.gz
Clean up assets that are older than 4 days to reduce assets cache sizecleanup-assets-older-than-4-days
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'scripts')
-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 %"