From 2c99820f35c3dcca563c7155efef2cdd0ccc0e4c Mon Sep 17 00:00:00 2001 From: jazzari Date: Tue, 12 Dec 2023 18:15:23 +0100 Subject: [PATCH] feat: agregado metodo de limpieza de git-lfs en cleanup_service.rb #8521 --- app/services/cleanup_service.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/services/cleanup_service.rb b/app/services/cleanup_service.rb index ad87cf9a..c03858bd 100644 --- a/app/services/cleanup_service.rb +++ b/app/services/cleanup_service.rb @@ -29,6 +29,7 @@ class CleanupService site.deploys.find_each(&:cleanup!) site.repository.gc + lfs_cleanup site.touch end end @@ -41,7 +42,14 @@ class CleanupService next unless File.directory? site.path site.repository.gc + lfs_cleanup site.touch end end + + private + def lfs_cleanup + site.repository.git_sh("git", "lfs", "prune") + site.repository.git_sh("git", "lfs", "dedup") + end end